13

Someone sent me a pull request. Before I merge it, I want to look at the changes on my machine. How do I do that?

Jay Bazuzi
  • 45,157
  • 15
  • 111
  • 168
  • 1
    I have seen lots of other more complex answers to this question. I found an answer I liked a lot better, so I'm putting it on stackoverflow so I can find it again. Maybe it will help you, too? – Jay Bazuzi Mar 13 '13 at 21:44
  • Doesn't the email that GitHuv sends you include this information? – SLaks Mar 13 '13 at 21:44
  • The email I got recently looked like this: `git pull https://github.com/USER/PROJECT BRANCH`, which is useful but different. Maybe there's something I'm missing. – Jay Bazuzi Mar 13 '13 at 21:47

1 Answers1

26

From http://community.elgg.org/pages/view/1123557/how-to-check-out-a-pull-request-for-testing

For pull request #123:

git fetch origin pull/123/head:pr-123
git checkout pr-123 
Jay Bazuzi
  • 45,157
  • 15
  • 111
  • 168