Download Github pull request as unified diff

前端 未结 3 1357
眼角桃花
眼角桃花 2020-12-12 08:54

How can I download the changes contained in a Github pull request as a unified diff?

3条回答
  •  無奈伤痛
    2020-12-12 09:16

    To get the PR changes into your local repo in an staged but uncommitted state, so you can review:

    git pull origin pull/123/head --no-commit
    

    And to generate a patch file from that:

    git diff --cached > pr123.diff    
    

提交回复
热议问题