Skip to content

Instantly share code, notes, and snippets.

@tlaak
Created June 17, 2020 19:40
Show Gist options
  • Save tlaak/29056bf96619c8a175807c0d33edefa2 to your computer and use it in GitHub Desktop.
Save tlaak/29056bf96619c8a175807c0d33edefa2 to your computer and use it in GitHub Desktop.
Use main as the branch name on `git init`
# Source https://twitter.com/jeromegamez/status/1271450353226133505?s=20
mkdir -p ~/.config/git/template
echo "ref: refs/heads/main" > ~/.config/git/template/HEAD
git config --global init.templateDir "~/.config/git/template"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment