* .config/git/config: Set defaultBranch to main.
authorAmin Bandali <bandali@gnu.org>
Sun, 20 Nov 2022 03:15:37 +0000 (22:15 -0500)
committerAmin Bandali <bandali@gnu.org>
Sun, 20 Nov 2022 03:15:37 +0000 (22:15 -0500)
Supported as of git 2.28.  The previous approach of using a template
directory would work on a wider range of older git versions, but it
would result in git not creating any files/directories (like hooks/)
in a repo's .git directory e.g. after clones or initializations.

.config/git/config
.config/git/template/HEAD [deleted file]

index 7db0f89..afa03c0 100644 (file)
@@ -70,4 +70,4 @@
        fsckObjects = true
 
 [init]
        fsckObjects = true
 
 [init]
-       templateDir = ~/.config/git/template
+       defaultBranch = main
diff --git a/.config/git/template/HEAD b/.config/git/template/HEAD
deleted file mode 100644 (file)
index 6c4e0e7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ref: refs/head/main