From 3082ae767737775971f61b0ba563f78d4bafa42c Mon Sep 17 00:00:00 2001 From: Georgi Dimitrov Date: Mon, 4 Dec 2023 16:37:25 +0000 Subject: [PATCH] git: add an alias to remove merged local branches --- git/gitconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/git/gitconfig b/git/gitconfig index c0da17e0..0a13f799 100644 --- a/git/gitconfig +++ b/git/gitconfig @@ -31,6 +31,7 @@ find = !git log -p -S all = "!f() { ls -R -d */.git | sed s,/.git,, | xargs -t -P0 -I{} git -C {} $1; }; f" latest = for-each-ref --color=always --sort=committerdate refs/remotes --format='%(color:bold green)%(committerdate:relative) %(HEAD)%(color:yellow)%(refname:short) %(color:blue)%(subject) %(color:magenta)%(authorname)%(color:reset)' + delete-local-merged = "!git fetch && git branch --merged | egrep -v 'master|main' | xargs git branch -d" [color] branch = auto diff = auto