diff --git a/git/gitconfig b/git/gitconfig index 6bc9c02..496df31 100644 --- a/git/gitconfig +++ b/git/gitconfig @@ -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 diff --git a/git/githelpers b/git/githelpers index f7682a0..39af463 100644 --- a/git/githelpers +++ b/git/githelpers @@ -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 +} \ No newline at end of file