summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2025-01-10 13:17:03 +0000
committerdakkar <dakkar@thenautilus.net>2025-01-10 13:17:03 +0000
commit66976fd0312eab3f8eea41c984a0d631d763fc1d (patch)
tree5f6da7cd0b8867fbf75be8ff2d377b1663799cd3
parentshow command duration on prompt (diff)
downloaddotfiles-66976fd0312eab3f8eea41c984a0d631d763fc1d.tar.gz
dotfiles-66976fd0312eab3f8eea41c984a0d631d763fc1d.tar.bz2
dotfiles-66976fd0312eab3f8eea41c984a0d631d763fc1d.zip
killmerged with custom remote
-rw-r--r--.bash_profile5
1 files changed, 3 insertions, 2 deletions
diff --git a/.bash_profile b/.bash_profile
index 69caecd..c6f4d6e 100644
--- a/.bash_profile
+++ b/.bash_profile
@@ -45,10 +45,11 @@ function pm() {
}
function killmerged() {
- for b in $(git branch --merged HEAD --no-contains HEAD|grep -vE 'stage|master|svn|develop|uat'); do
+ local remote="${1:-origin}"
+ for b in $(git branch --merged HEAD --no-contains HEAD|grep -vE 'stage|master|svn|develop|uat|stable'); do
b="${b##+( )}"
b="${b%%+( )}"
- git branch -d $b && git push origin :$b
+ git branch -d $b && git push "$remote" :$b
done
}