From 80918eb50a322f15f4ecf44c4f14e34daaf7c1ec Mon Sep 17 00:00:00 2001 From: Andrew Stowell Date: Sun, 6 Aug 2023 20:36:55 +0000 Subject: [PATCH] added setting for making "main" default git branch --- one-time-stuff/basic-settings.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/one-time-stuff/basic-settings.sh b/one-time-stuff/basic-settings.sh index 36b6b2f..f7ff9e1 100755 --- a/one-time-stuff/basic-settings.sh +++ b/one-time-stuff/basic-settings.sh @@ -28,6 +28,16 @@ case $set_pager in ;; esac +read -p 'Set git default branch name to "main"? [y/N]: ' set_branch +case $set_branch in + [Yy]* ) + git config --global init.defaultBranch main + ;; + * ) + echo 'Skipping' + ;; +esac + # ---------------------------------------------------------- echo "----- User Groups (requires sudo) -------------------"