protect master & develop from gone deletion

This commit is contained in:
Gabriel Augendre 2024-12-06 12:11:54 +01:00
parent a1b2ac27f9
commit 3f93f0b3e9

View file

@ -35,7 +35,7 @@
s = status -sb s = status -sb
ign = ! "curl -L -s https://www.gitignore.io/api/$@" ign = ! "curl -L -s https://www.gitignore.io/api/$@"
syn = ! "git pull --rebase && git push" syn = ! "git pull --rebase && git push"
gone = ! "git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" {print $1}' | xargs -r git branch -D" gone = ! "git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" {print $1}' | grep -v master | grep -v develop | xargs -r git branch -D"
praise = blame praise = blame
pushf = push --force-with-lease --force-if-includes pushf = push --force-with-lease --force-if-includes
cobf = ! "f() { git branch -D $1 && git switch -c $1; }; f" cobf = ! "f() { git branch -D $1 && git switch -c $1; }; f"