Commands: Git branching
Create branch 'branch-name'
git branch branch-name
Change local working copy to 'branch-name'
git checkout branch-name
Or everything in one line
git checkout -b branch-name
Master is like another branch
git checkout master
Delete branch 'branch-name'
git branch -d branch-name
Merge changes back to master
git checkout master
git merge branch-name
Ocasionally solve any conflicts and manually commit them.
If you want to know when to use it and how it works, the Chapter 3.2 of the Git Book explains it with good examples and diagrams.
Written by Jonas Hartmann
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#