Skip to content

Instantly share code, notes, and snippets.

@y16ra
Created March 28, 2022 01:20
Show Gist options
  • Select an option

  • Save y16ra/b6363abd8a1b77e9f7175ecd94f58386 to your computer and use it in GitHub Desktop.

Select an option

Save y16ra/b6363abd8a1b77e9f7175ecd94f58386 to your computer and use it in GitHub Desktop.
Configure default git branch name
git config --global init.defaultBranch main
@y16ra

y16ra commented Mar 28, 2022

Copy link
Copy Markdown
Author

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

@y16ra

y16ra commented Mar 28, 2022

Copy link
Copy Markdown
Author

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