Set git config system wide
This commit is contained in:
parent
0ae0fd8afe
commit
3ebc824061
1 changed files with 6 additions and 1 deletions
|
@ -7,7 +7,10 @@ begin
|
||||||
sudo git config --system $argv
|
sudo git config --system $argv
|
||||||
end
|
end
|
||||||
|
|
||||||
setConfig init.defaultBranch "main"
|
if isSet "$branch"
|
||||||
|
setConfig init.defaultBranch (getConfig "$branch")
|
||||||
|
end
|
||||||
|
|
||||||
setConfig user.name "Manuel Thalmann"
|
setConfig user.name "Manuel Thalmann"
|
||||||
setConfig user.email "m@nuth.ch"
|
setConfig user.email "m@nuth.ch"
|
||||||
|
|
||||||
|
@ -15,6 +18,7 @@ begin
|
||||||
set -l dir (mktemp -d)
|
set -l dir (mktemp -d)
|
||||||
|
|
||||||
pushd "$dir" > /dev/null
|
pushd "$dir" > /dev/null
|
||||||
|
begin
|
||||||
git init
|
git init
|
||||||
git commit --allow-empty -m "Initial commit" > /dev/null
|
git commit --allow-empty -m "Initial commit" > /dev/null
|
||||||
git branch master || true &> /dev/null
|
git branch master || true &> /dev/null
|
||||||
|
@ -23,6 +27,7 @@ begin
|
||||||
yes "" | git flow init &> /dev/null
|
yes "" | git flow init &> /dev/null
|
||||||
sudo git flow config set --system master main > /dev/null
|
sudo git flow config set --system master main > /dev/null
|
||||||
sudo git flow config set --system develop dev > /dev/null
|
sudo git flow config set --system develop dev > /dev/null
|
||||||
|
end
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
rm -rf "$dir"
|
rm -rf "$dir"
|
||||||
|
|
Loading…
Reference in a new issue