I want to track a Github pull request locally with git as the request is updated (example: more commits are added). Github has a way that you can work on pull requests that come to your repo by checking out the read only refs/pull/.
In other words if someone submits a pull request to my repo I can retrieve that request locally:
git fetch upstream pull/123/head:123
git checkout 123
The problem comes in when someone then updates that pull request. I can't figure out how to update the local branch because git pull doesn't work to update my local copy:
$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=<remote>/<branch> 123
I've tried:
git branch --set-upstream-to=upstream/refs/pull/123/head 123
git branch --set-upstream-to=upstream/refs/pull/123 123
git merge --ff-only refs/pull/123/head
merge: refs/pull/123/head - not something we can merge