Search code examples
gitgit-pull

How to get list of changes between two commits, from Git server


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?


Solution

  • 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.