From 957852471c981eb4bd1e436e77b6102d9103df9a Mon Sep 17 00:00:00 2001 From: Jake Date: Wed, 14 Mar 2018 10:39:18 +0000 Subject: [PATCH] Cleanup more stale local branches --- modules/shell/files/applications.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/shell/files/applications.sh b/modules/shell/files/applications.sh index 86dbb1b..d45d0b9 100644 --- a/modules/shell/files/applications.sh +++ b/modules/shell/files/applications.sh @@ -22,7 +22,10 @@ gh() { } git-cleanup() { - command git checkout master && git branch --merged | grep -v '*' | xargs -n 1 git branch -d + command git checkout master + command git branch --merged | grep -v '*' | xargs -n 1 git branch -D + command git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D + command git remote prune origin command git gc --aggressive command git checkout - }