Tuesday, May 13, 2014

Git & GitHub


GitHub Video Tutorials

add a  remote origin to your git repo 

Instead of removing and re-adding, you can do this:
  $ git remote set-url origin <git@github.com:whatever.git>

To check your remotes are correct:
  $ git remote -v

newbie notes: 
  • make sure you are in the directory you want to add the remote to and that you are on the master branch
  • don't add the <> brackets, just put the git repo in there ie: git@github.com:whatever.git
  • use the SSH clone URL in the right column of the git repo you want to push and pull from
  • (super newbie note) don't type in the $ sign, this means type this in your terminal


git deleting branches

To delete a local branch
git branch -d the_local_branch

To remove a remote branch (if you know what you are doing!)
git push origin :the_remote_branch

No comments:

Post a Comment