Initialize new repositories with a main branch

New Git repositories start out without any branches, but the HEAD
reference points to "master" by default. This means that the first
commit will create a master branch.

This change adds a HEAD file to the Git template with a different ref.
This means that new repositories will commit to a "main" branch by
default instead.

The HEAD file is added to COPY_ALWAYS, because Git's HEAD must be a
regular file and not a symbolic link.
This commit is contained in:
Joe Ferris 2020-06-19 14:08:12 -04:00
parent 2e3d643c54
commit 56d614f806
No known key found for this signature in database
GPG key ID: 1B00F8C9678CF148
2 changed files with 2 additions and 0 deletions

1
git_template/HEAD Normal file
View file

@ -0,0 +1 @@
ref: refs/heads/main

1
rcrc
View file

@ -1,2 +1,3 @@
EXCLUDES="README*.md LICENSE"
DOTFILES_DIRS="$HOME/dotfiles-local $HOME/dotfiles"
COPY_ALWAYS="git_template/HEAD"