PortValhalla/scripts/Common/Software/git/main.fish

65 lines
2.1 KiB
Fish
Raw Normal View History

2024-07-15 10:10:06 +00:00
#!/bin/env fish
begin
source "$(status dirname)/../../Scripts/software.fish"
function configureSW -S
2024-07-15 12:47:06 +00:00
function setConfig
sudo git config --system $argv
end
2024-07-15 12:58:54 +00:00
if isSet "$branch"
setConfig init.defaultBranch (getConfig "$branch")
end
2024-07-15 12:47:06 +00:00
setConfig user.name "Manuel Thalmann"
setConfig user.email "m@nuth.ch"
2024-07-15 10:10:06 +00:00
begin # Git Flow
set -l dir (mktemp -d)
pushd "$dir" > /dev/null
2024-07-15 12:58:54 +00:00
begin
2024-07-15 10:10:06 +00:00
git init
git commit --allow-empty -m "Initial commit" > /dev/null
git branch master || true &> /dev/null
git branch main || true &> /dev/null
git branch dev || true &> /dev/null
yes "" | git flow init &> /dev/null
2024-07-15 12:47:06 +00:00
sudo git flow config set --system master main > /dev/null
sudo git flow config set --system develop dev > /dev/null
2024-07-15 12:58:54 +00:00
end
2024-07-15 10:10:06 +00:00
popd > /dev/null
rm -rf "$dir"
end
2024-07-15 12:47:06 +00:00
setConfig alias.ahfange init
setConfig alias.tuedezue add
setConfig alias.beschuldig blame
setConfig alias.zieh pull
setConfig alias.druck push
setConfig alias.machnah clone
setConfig alias.hol fetch
setConfig alias.zwiigab branch
setConfig alias.buechiih commit
setConfig alias.eich rebase
setConfig alias.erd rebase
setConfig alias.gahufwiifelde rebase
setConfig alias.vergliich diff
setConfig alias.tuezemme merge
setConfig alias.versorg stash
setConfig alias.markier tag
setConfig alias.pflueckoepfel cherry-pick
setConfig alias.pflueckhimbeeri cherry-pick
setConfig alias.buechuus checkout
setConfig alias.quaetsch 'merge --squash'
setConfig alias.pfudle 'push --force'
setConfig alias.beschuldigung blame
setConfig alias.zwiigli branch
setConfig alias.tagebuech log
setConfig alias.versteck stash
setConfig alias.zuestand status
setConfig alias.markierig tag
2024-07-15 10:10:06 +00:00
end
end