-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Is your feature request related to a problem? Please describe.
GitHub and git are now using 'main' instead of 'master' for the default branch name. lazygit only considers 'master', and colors 'main' as a branch instead of the default branch.
Describe the solution you'd like
git can now be configured to use any name as the default branch with the following config snippet:
[init]
defaultBranch = main
lazygit should use the defaultBranch option for programatically determine the branch to color as master, and fall back to 'master' or 'main' if it's not present.
Describe alternatives you've considered
Additional context
https://github.com/github/renaming
git 2.28 introduced the defaultBranch config option: https://github.blog/2020-07-27-highlights-from-git-2-28/#introducing-init-defaultbranch