feat: more git aliases

This commit is contained in:
2018-05-31 16:29:03 -07:00
parent 24517faffc
commit c253b61fb0
2 changed files with 11 additions and 0 deletions

View File

@@ -124,3 +124,11 @@ backport_pr() {
# switch back if we didn't start in the target branch
[ "$THISBRANCH" != "$BRANCH" ] && git checkout -
}
track_remote() {
REMOTE=$1
: ${REMOTE:="origin"}
BRANCH=$2
[ -z "$BRANCH" ] && BRANCH=`git rev-parse --abbrev-ref HEAD`
git branch --set-upstream-to=${REMOTE}/${BRANCH} ${BRANCH}
}