Rebase to Master: the formula appears to be:
Make sure that we’ve on the PR branch:
git branch -av
If not already done, make sure the branch is compiling and testing cleanly, and that everything is checked in.
Check whether we have an upstream set:
git remote -v
Add the upstream if there isn’t one:
git remote add upstream <clone URL of the official master repo>
Check the remotes again, to make sure the upstream looks right.
Fetch the upstream, to get the current master:
git fetch upstream
Do the actual rebase operation:
git rebase upstream/master
Clean, compile, test, and fix stuff if needed.
Force-push the new code to my own repo:
git push -f origin <branch name>
Check that it builds and tests properly in the PR.