Git Command for Creating new BRANCH from Terminal

In git we can create branches as per our project development. We can easily do that using terminal command. We can directly create new branch and checkout to that from the terminal using the below command.

git checkout -b new-branch-name

Here in the about command replace new-branch-name with the required branch name.

For example, If you are in the master branch, then you can create a new branch for development call develop branch like,

git checkout -b develop

If you want to create again branch from the develop branch, then you can try like

git checkout -b feature-home

About the Author: smartcoder

You might like

Leave a Reply

Your email address will not be published. Required fields are marked *