Set git config system wide

This commit is contained in:
Manuel Thalmann 2024-07-15 14:58:54 +02:00
parent 0ae0fd8afe
commit 3ebc824061

View file

@ -7,7 +7,10 @@ begin
sudo git config --system $argv
end
setConfig init.defaultBranch "main"
if isSet "$branch"
setConfig init.defaultBranch (getConfig "$branch")
end
setConfig user.name "Manuel Thalmann"
setConfig user.email "m@nuth.ch"
@ -15,6 +18,7 @@ begin
set -l dir (mktemp -d)
pushd "$dir" > /dev/null
begin
git init
git commit --allow-empty -m "Initial commit" > /dev/null
git branch master || true &> /dev/null
@ -23,6 +27,7 @@ begin
yes "" | git flow init &> /dev/null
sudo git flow config set --system master main > /dev/null
sudo git flow config set --system develop dev > /dev/null
end
popd > /dev/null
rm -rf "$dir"