Skip to content

Instantly share code, notes, and snippets.

@whoisryosuke
Created August 25, 2021 16:59
Show Gist options
  • Select an option

  • Save whoisryosuke/54982192a414d22940f413f128f51bbf to your computer and use it in GitHub Desktop.

Select an option

Save whoisryosuke/54982192a414d22940f413f128f51bbf to your computer and use it in GitHub Desktop.
Git - Set default branch as main when creating new git repos (`git init`). As of Git 2.28 (released 27th July 2020), you can now configure the name of the branch created when you init a new repository. https://superuser.com/a/1572156
git config --global init.defaultBranch main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment