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

后端 未结 6 967
终归单人心
终归单人心 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:01

    Not sure if there is a way to get the actual diff format closer to Github style but $ git diff master... seems to show the set of changes that a pull request would show (assuming it's a pull request against master). The list of changed files in a pull request seems to be equivalent to $ git diff --name-status master.... I guess this all assumes that your local branches are up-to-date with the remote Github branches

提交回复
热议问题