summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryushyin <yushyin@saga>2019-04-28 23:31:14 +0200
committeryushyin <yushyin@saga>2019-04-28 23:31:14 +0200
commit9a134293ecf46cd73d493b25d35239dfe05651f1 (patch)
tree0d57d2efba1a54bd947e38b91409b614b9ba9512
parent68ae5a04e141f57017eb9653607077673924af64 (diff)
downloaddotfiles-9a134293ecf46cd73d493b25d35239dfe05651f1.tar.gz
dotfiles-9a134293ecf46cd73d493b25d35239dfe05651f1.tar.xz
Git: Add rmbranch alias
-rw-r--r--git/config8
1 files changed, 8 insertions, 0 deletions
diff --git a/git/config b/git/config
index 069f4f9..03c6e91 100644
--- a/git/config
+++ b/git/config
@@ -67,3 +67,11 @@
/$rx/ && !/HEAD/ ? $_ : () \
} Git::command(qw/branch --sort=committerdate -r/) \
'"
+
+ # rmbranch <repository> branchname deletes local und remote branch
+ # <repository> defaults to origin
+ rmbranch = !"perl -MGit -E' \
+ my ($re, $br) = (@ARGV > 1? shift : q{origin}, shift // q{}); \
+ Git::command_noisy(qw{branch -d}, $br); \
+ Git::command_noisy(qw{push -d}, $re, $br); \
+ '"