Reputation: 107
So I'm currently reviewing a pull request from an upstream repo that I forked, and created a local branch to fetch the pull request via git fetch upstream pull/869/head:readme
. However, there have been some recent commits made to that pull request since I created the branch. How do I update the pull request branch to incorporate the new commits? Pull requests aren't visible in the same way that would allow me to otherwise do a git fetch upstream
and git merge upstream/master
Upvotes: 0
Views: 232
Reputation: 1329092
Try:
git config --add remote.upstream.fetch "+refs/pull/*/head:refs/remotes/upstream/pr/*"
See more at "prm.md". The default refspec (+refs/heads/*:refs/remotes/upstream/*
) does not fetch pull request
Then a fetch upstream
would allow you to see
upstream/pr/189
And you can rebase (not merge) your own branch of top of it.
git rebase upstream/pr/189
Upvotes: 1