From 0390fdb43dd272407e9a0770646f9e19e06743bd Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Tue, 28 Feb 2023 14:12:55 -0500 Subject: [PATCH] Add alias for git sweep --- gitconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/gitconfig b/gitconfig index be48358..39b78a2 100644 --- a/gitconfig +++ b/gitconfig @@ -59,6 +59,7 @@ [alias] hug = blame lograph = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' + sweep = !git branch --merged $([[ $1 != \"-f\" ]] && git rev-parse master) | egrep -v \"(^\\*|^\\s*(master|develop)$)\" | xargs git branch -d [commit] template = ~/.gittemplate