add aliases to sync with other remotes and checkout pull requests

This commit is contained in:
2014-07-18 15:33:54 -07:00
parent 8293e68365
commit da273eabd7
2 changed files with 16 additions and 0 deletions

View File

@@ -40,3 +40,17 @@ pretty_git_log() {
less -FXRS
}
sync_to_remote() {
REMOTE=$1
: ${REMOTE:="upstream"}
BRANCH=`git rev-parse --abbrev-ref HEAD`
git fetch upstream
git merge --ff-only ${REMOTE}/${BRANCH};
}
get_pr() {
REMOTE=$2
: ${REMOTE:="upstream"}
git fetch ${REMOTE} pull/${1}/head:pr/${1}
git checkout pr/${1}
}