Your Branch
Your default Branch name :
By default Git will create a branch called master when you create a new repository with git init. From Git version 2.28 onwards, you can set a different name for the initial branch.
To set main as the default branch name do:
$ git config --global init.defaultBranch mainChecking Your Settings :
If you want to check your configuration settings, you can use the git config --list command to list all the settings Git can find at that point:

You may see keys more than once, because Git reads the same key from different files ([path]/etc/gitconfig and ~/.gitconfig, for example). In this case, Git uses the last value for each unique key it sees.
You can also check what Git thinks a specific key’s value is by typing git config <key>:
$ git config user.name
Komal VardhanLast updated
Was this helpful?