How to create a new branch?

  • 1 Min. Read.

Creating a branch in git is very simple:

This will create a new local branch with the name you specified.

From the manpage:

With no arguments, existing branches are listed and the current branch will be highlighted with an asterisk.

How to push a new branch to remote?

Now that we’ve created this local branch, the next step is to push it to the remote:

The -u option is short for set upstream and this refers to the remote repository.

Was this article helpful?

Related guides

Comments 0
There are no comments at the moment.
A concept by Wonderlus