Created
March 6, 2013 16:57
-
-
Save mkoby/5100894 to your computer and use it in GitHub Desktop.
Version Control with Git - 05 - Branching
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Create a new 'dev' branch in Git | |
git branch dev | |
#See a list of branches | |
git branch | |
#You can switch to the branch using 'checkout' | |
git checkout dev | |
#If you want to checkout and create a new branch in a single command run | |
git checkout -b dev #creates and places you in the new dev branch | |
#After you make changes to in the branch, you can merge this branch back into your 'master' branch | |
#First, checkout master | |
git checkout master | |
#Now merge the branch using the 'merge' command | |
git merge dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment