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

Warning: Parameter 1 to W3_Plugin_TotalCache::ob_callback() expected to be a reference, value given in /mnt/home_bingo/codecaptain/codecaptain.io/public/wp-includes/functions.php on line 3583