2

Imagine there is one git user with read access. at the first time he clones a repo on his machine. then he finds out that there is a new bunch of change and do pull the repo (pull request #1).

Some hours later he told to do pull again (pull request #2). so how can he get list of changes between the [latest commits] from these two pulls requests?

cellepo
  • 4,001
  • 2
  • 38
  • 57
  • I edited/struckout out pull "request" - Q&A resembles git "pull" & "commit", not pull request (see difference of the terms at https://stackoverflow.com/questions/22585407/git-pull-vs-pull-request). – cellepo Jul 28 '21 at 16:43

2 Answers2

2

For concrete code changes you can use git diff.

git diff <sha1 of pull request #1> <sha1 of pull request #2>

Take a look at the documentation.

Sascha Wolf
  • 18,810
  • 4
  • 51
  • 73
1

git log accepts a range parameter:

git log <1st sha>..<2nd sha>
Mureinik
  • 297,002
  • 52
  • 306
  • 350
  • The double dot syntax isn't very intuitive when used the first time. Take a look at the [*Revision selection* chapter](http://git-scm.com/book/it/v2/Git-Tools-Revision-Selection) of the progit book. – Sascha Wolf Jan 21 '15 at 07:29