DEV Community

Cover image for πŸ”₯ Changing Your Git Repository From Master To Main πŸ”₯
Aosu Stephen Terver
Aosu Stephen Terver

Posted on • Edited on

πŸ”₯ Changing Your Git Repository From Master To Main πŸ”₯

It has become imperative for us to remove the master/slave terms from our codes.

I will be showing you how I did that for my local git repository.

Simply get into your project directory from the terminal and run the following command:

git branch -m master main
Enter fullscreen mode Exit fullscreen mode

For this command to work as expected, make sure you have made some commits on the branch.

And viola! πŸ’₯ that is it. You can now push to your remote.

Top comments (1)

Collapse
 
dapone profile image
Afisunlu Dapo

Great!