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

后端 未结 6 949
终归单人心
终归单人心 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条回答
  •  终归单人心
    2021-02-18 22:12

    The closest thing is to diff with the common ancestor between your feature-branch and your base-branch.

    Something like:

    git diff `git merge-base feature-branch base-branch`
    

提交回复
热议问题