Skip to content

Instantly share code, notes, and snippets.

@srkirkland
Created April 4, 2012 21:26
Show Gist options
  • Select an option

  • Save srkirkland/2305799 to your computer and use it in GitHub Desktop.

Select an option

Save srkirkland/2305799 to your computer and use it in GitHub Desktop.
## Creating a branch and working on a remote branch
git checkout -b superfunbranchname
## This puts you onto a new branch with the given name
## Do work, commit changes, etc.
git push origin superfunbranchname
## This pushed your branch so others can get to that code
## That's it really, but if you want to go back to master (maybe something else came up unrelated to this branch)
git checkout master
## then you can always check out the branch again by doing
git checkout superfunbranchname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment