some additional git helpers

This commit is contained in:
2014-11-05 11:15:02 -07:00
parent 9143c5cc71
commit a10dd6785a
2 changed files with 10 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
ui = auto
[alias]
st = status
bi = bisect
ci = commit
co = checkout
di = diff
@@ -32,9 +33,10 @@
todo = grep --heading --break --ignore-case -e ' FIX: *' -e ' TODO: *'
pr = "!source ~/.githelpers && get_pr"
prd = "!source ~/.githelpers && del_pr"
[merge]
tool = vimdiff
ff = false
ff = true
[push]
default = current
[branch]

View File

@@ -54,3 +54,9 @@ get_pr() {
git fetch ${REMOTE} pull/${1}/head:pr/${1}
git checkout pr/${1}
}
del_pr() {
BRANCH=`git rev-parse --abbrev-ref HEAD`
git checkout - && git branch -D ${BRANCH}
}