Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Git Set Initial Branch Name

When you initiate a new repository, the name of the Main Branch is automatically set as master.

Many people have become aware that the terminology master/slave should be replaced with something more appropriate.

Most companies choose to name the main Branch as main.

So let’s do that!

Prefer a video guide instead? Check this out:


Set initial branch name

In the command line run the following command:

git config --global init.defaultBranch main

This command will add a new configuration to your ~/.gitconfig file.

From now on, when you initiate a new repository, the name of the main branch will be main.



This post first appeared on Neutron Dev, please read the originial post: here

Share the post

Git Set Initial Branch Name

×

Subscribe to Neutron Dev

Get updates delivered right to your inbox!

Thank you for your subscription

×