DEV Community

loading...

How To Create A New Branch With Git Using Terminal

jasurkurbanovinit profile image Jasur Kurbanov ・1 min read

In this post I will show how to create a new branch with git using VS Code.

Before creating new branch, your branch needs to be up-to-date with latest changes. So, first you need to pull latest changes from remote branch.

git pull
Enter fullscreen mode Exit fullscreen mode

Now you can create new branch and switch to that branch

git checkout -b [name_of_your_new_branch]
Enter fullscreen mode Exit fullscreen mode

Once, you created new branch. It is time to push to Github.

git push origin [name_of_your_new_branch]
Enter fullscreen mode Exit fullscreen mode

New branch successfully created and uploaded.

Information obtained from Kunena-Forum:

Discussion (0)

pic
Editor guide