Last Updated: February 25, 2016
·
436
· jonashartmann

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.