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

60 lines
2 KiB
Fish

#!/bin/env fish
begin
source "$(status dirname)/../../Scripts/software.fish"
function configureSW -S
function setConfig
sudo git config --system $argv
end
setConfig init.defaultBranch "main"
setConfig user.name "Manuel Thalmann"
setConfig user.email "m@nuth.ch"
begin # Git Flow
set -l dir (mktemp -d)
pushd "$dir" > /dev/null
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
sudo git flow config set --system master main > /dev/null
sudo git flow config set --system develop dev > /dev/null
popd > /dev/null
rm -rf "$dir"
end
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
end
end