Get to Know Git

Getting Started with Branches

To view all branches available:

git branch

To create a branch:

git branch <new-branch-name>

To jump into the new branch, we need to checkout that branch:

git checkout <branch-name>

To create a new branch and checkout at the same time:

git checkout -b <new-branch-name>

To delete a branch:

git branch -d <branch-name>

Like this article? Follow @chrisoncode on Twitter