Git’s branching functionality lets you create new branches of a project.
git branch
1. To just create a branch
git branch branch-name
2. To create a branch and move to it
Method 1 :
git branch branch-name
git checkout branch-name
Method 2:
git checkout -b branch -name
git branch -m old-branch-name new-branch-name
git diff first-branch second-branch
git checkout branch-in-which-you-have-to-merge
git merge branch-which-you-want-to merge
Cheatsheet