How to Create a New Branch on GitHub?
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:
Syntax:
git checkout -b <branch-name>
Example:
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...
Hardik Savani
I'm a full-stack developer, entrepreneur and owner of ItSolutionstuff.com. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- How to Ignore Wildcard Files Name in Git using Gitignore?
- How to Ignore Folder in Git using Gitignore?
- How to Ignore File in Git using Gitignore?
- How to Git Ignore Some Files Locally?
- How to Clone a Git Repository into a Specific Folder?
- How to Merge Your Branch to main Branch in Github?
- Git Command to Ignore File Permission Changes
- Git - How to Find a Deleted File in Commit History?
- How to Configure Git Username and Email?
- How to Git Force Pull from Remote Branch?