add git branch cleanup helper and alias

This commit is contained in:
2014-12-23 15:40:51 -07:00
parent a10dd6785a
commit 4ba4906c2a
2 changed files with 7 additions and 0 deletions

View File

@@ -34,6 +34,7 @@
todo = grep --heading --break --ignore-case -e ' FIX: *' -e ' TODO: *'
pr = "!source ~/.githelpers && get_pr"
prd = "!source ~/.githelpers && del_pr"
brc = "!source ~/.githelpers && clean_branches"
[merge]
tool = vimdiff
ff = true

View File

@@ -60,3 +60,9 @@ del_pr() {
git checkout - && git branch -D ${BRANCH}
}
clean_branches() {
BRANCHES=`git branch | grep -v \*`
for i in ${BRANCHES}; do
git branch -d $i
done
}