some basic commands for branches. you can read the official page for more details
you wanna develope a feature, fix a bug, test some stuff … you need a branch !
git checkout -b feature1
if you have a central repo, push the feature upstream (so others can checkout as well)
git push --set-upstream origin feature1
you may have multiple branches, list them all
from master to feature1 and back to master
git checkout master git checkout feature1 git checkout master
if your’re fine with your code, you merge your branch into master
git checkout master git merge feature1
git delete branch
finally, delete the branch and process with on the master
git branch -d feature1
Happy Git !