add git branch cleanup helper and alias
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
todo = grep --heading --break --ignore-case -e ' FIX: *' -e ' TODO: *'
|
todo = grep --heading --break --ignore-case -e ' FIX: *' -e ' TODO: *'
|
||||||
pr = "!source ~/.githelpers && get_pr"
|
pr = "!source ~/.githelpers && get_pr"
|
||||||
prd = "!source ~/.githelpers && del_pr"
|
prd = "!source ~/.githelpers && del_pr"
|
||||||
|
brc = "!source ~/.githelpers && clean_branches"
|
||||||
[merge]
|
[merge]
|
||||||
tool = vimdiff
|
tool = vimdiff
|
||||||
ff = true
|
ff = true
|
||||||
|
|||||||
@@ -60,3 +60,9 @@ del_pr() {
|
|||||||
git checkout - && git branch -D ${BRANCH}
|
git checkout - && git branch -D ${BRANCH}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clean_branches() {
|
||||||
|
BRANCHES=`git branch | grep -v \*`
|
||||||
|
for i in ${BRANCHES}; do
|
||||||
|
git branch -d $i
|
||||||
|
done
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user