Skip to content

Instantly share code, notes, and snippets.

@ef2k
Created October 25, 2013 16:33
Show Gist options
  • Save ef2k/7157599 to your computer and use it in GitHub Desktop.
Save ef2k/7157599 to your computer and use it in GitHub Desktop.
Clone and add remote branches to your project.
git clone https://github.com/brooklyndevs/metroly-html5.git
git branch dev origin/dev
# At this point you have master and dev branch
# You can check what branch you are on by typing:
git branch
# To switch between branches use the git checkout followed by the branch name:
git checkout dev
# Do your work, commit as much as you like. Note: You always need to commit
# before attempting to switch branches.
# PUSHING YOUR CHANGES #
# ==================== #
# You can push your changes to branches individually. Like this:
git push origin <whatever branch you are on>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment