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:
parent
2e3d643c54
commit
56d614f806
2 changed files with 2 additions and 0 deletions
1
git_template/HEAD
Normal file
1
git_template/HEAD
Normal file
|
@ -0,0 +1 @@
|
|||
ref: refs/heads/main
|
1
rcrc
1
rcrc
|
@ -1,2 +1,3 @@
|
|||
EXCLUDES="README*.md LICENSE"
|
||||
DOTFILES_DIRS="$HOME/dotfiles-local $HOME/dotfiles"
|
||||
COPY_ALWAYS="git_template/HEAD"
|
||||
|
|
Loading…
Add table
Reference in a new issue