From 3f93f0b3e9f3d664f8a151ee1dd00585a65fb865 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Fri, 6 Dec 2024 12:11:54 +0100 Subject: [PATCH] protect master & develop from gone deletion --- dot_config/git/private_config.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dot_config/git/private_config.tmpl b/dot_config/git/private_config.tmpl index b901c9c..abbca54 100644 --- a/dot_config/git/private_config.tmpl +++ b/dot_config/git/private_config.tmpl @@ -35,7 +35,7 @@ s = status -sb ign = ! "curl -L -s https://www.gitignore.io/api/$@" 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 pushf = push --force-with-lease --force-if-includes cobf = ! "f() { git branch -D $1 && git switch -c $1; }; f"