2. Setting up Git
Configuring default branch name
There is one last thing to configure before we can start working with Git: the default branch name.
In the past, the default used to be master
. However, in 2020, GitHub, GitLab, Bitbucket, and other platforms started to change the default name to main
. This was done to make the language of Git more inclusive and to remove any connotations of slavery from otherwise neutral terms.
Let's set the default branch name to main
in our Git configuration to avoid any confusion with the GitHub's defaults in the future.
Run in Terminal:
git config --global init.defaultBranch main
Task
Set your default branch name to main
using the command above.
© 2024-2025 GitByBit.All rights reserved.