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?
Asked
Active
Viewed 1.0k times
13
-
1I 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 Answers
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
-
-
Thanks, and how do I update it after pull request code was updated, force-pushed? – Vincas Dargis Feb 28 '21 at 12:53