Skip to content

Instantly share code, notes, and snippets.

@y16ra
Created March 28, 2022 01:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save y16ra/b6363abd8a1b77e9f7175ecd94f58386 to your computer and use it in GitHub Desktop.
Save y16ra/b6363abd8a1b77e9f7175ecd94f58386 to your computer and use it in GitHub Desktop.
Configure default git branch name
git config --global init.defaultBranch main
@y16ra
Copy link
Author

y16ra commented Mar 28, 2022

The default branch name in Git is master.
The default branch name for new repositories created on GitHub is now main.

@y16ra
Copy link
Author

y16ra commented Mar 28, 2022

How to rename the master branch to main.

git branch -m master main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment