How to create a new local branch in Git

Last updated on Sep 4, 2022 by Suraj Sharma



In this tutorial, you will learn how you can create a local git branch in your computer.


To create a local git branch, we use git checkout command

Here's a git command to create a new local branch


git checkout -b 'your branch name'

Example


git checkout -b test-branch

created-new-local-branch-in-git



Related Solutions


Rate this post


Suraj Sharma is the founder of Future Gen AI Services. He holds a B.Tech degree in Computer Science & Engineering from NIT Rourkela.