some additional git helpers
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user