Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change terminology from 'master' to 'main' for TortoiseGit?

In keeping with the times, GitHub has changed terminology from master to main, but my TortoiseGit still uses master as the name of the main branch.

So when I push my local repo to Github, there are now 2 branches in GitHub (main and master) which causes confusion.

How to make TortoiseGit change to using main as the default?

like image 499
likejudo Avatar asked Nov 07 '25 17:11

likejudo


1 Answers

This is set in the .gitconfig file You want

[init]
    defaultBranch = main

Through tortoisegit you would do settings→Git→Edit systemwide gitconfig and change defaultBranch from "master" to "main". This requires admin. Alternatively you could edit the global .gitconfig and add the section above.

like image 71
poompt Avatar answered Nov 09 '25 10:11

poompt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!