How do you recreate the GitHub pull request diff on the commandline?

后端 未结 6 944
终归单人心
终归单人心 2021-02-18 21:20

While working on a branch that I\'ve opened a pull request on, I would like to see the exact same diff that GitHub displays on the commandline. What is the particular git diff c

6条回答
  •  梦毁少年i
    2021-02-18 22:16

    See the Reviewing and Synchronising section in GitHub advanced training. In particular, after fetching the pull request you can view the diff prior to merging:

    $ git fetch origin refs/pull/1/head
    $ git show FETCH_HEAD
    

提交回复
热议问题