Cleanup more stale local branches

This commit is contained in:
Jake Howard 2018-03-14 10:39:18 +00:00
parent f8691b1139
commit 957852471c
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -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 -
}