aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Laboissière <rafael@laboissiere.net>2022-12-10 16:11:55 -0300
committerRafael Laboissière <rafael@laboissiere.net>2022-12-10 16:11:55 -0300
commitf369d82e136a93589f1b1d6c255b10de48e48db4 (patch)
tree0b33c3c711e8275c94bcc2d9be990f4840945d16
parent0f097c95bbf82fee6c7440d0feed58a140a324af (diff)
add-git-repo: Set initial branch to main
-rwxr-xr-xadd-git-repo4
1 files changed, 2 insertions, 2 deletions
diff --git a/add-git-repo b/add-git-repo
index f583642..ec68235 100755
--- a/add-git-repo
+++ b/add-git-repo
@@ -2,7 +2,7 @@
### Create a centralized Git repository
-### Copyright (C) 2015 Rafael Laboissiere
+### Copyright (C) 2015, 2022 Rafael Laboissiere
###
### This program is free software; you can redistribute it and/or modify it under
### the terms of the GNU General Public License as published by the Free Software
@@ -58,7 +58,7 @@ if [ -d $path ] ; then
exit 1
fi
mkdir $path
-( cd $path ; git init --bare)
+( cd $path ; git init --bare --initial-branch=main )
chown -R $user:$user $path
echo "$prog:I: Created Git repository $path"
echo "$prog:I: ls -ld $path"