Github - How to Create New Branch using Git Command?

By Hardik Savani April 22, 2022 Category : Git

Here, I will show you how to create branch using git command. I would like to show you git create new branch from master. I would like to show you github create new branch command line. This post will give you simple example of git create new branch using command line.

In this tutorial, we will use git checkout command for creating new branch in github repository. we will use git command to create branch into github. so let's follow the below step to create branch in git.

Clone Git Repository(Optional):

If you are new and you haven't create or clone github repository yet then you can follow bellow tutorial:

Github Create or Clone Git Repository.

Create New Branch using Git Command:

Here, i will give you git command to create new "dev" branch in github. let's see below syntax and example with output:


git checkout -b <branch-name>


git checkout -b dev

You can see below layout:

Let's see created new branch in Github Repository List:

I hope it can help you...

Tags :