Create a patch by comparing a specific branch on the remote with a specific local branch

前端 未结 2 449
离开以前
离开以前 2021-01-30 08:50

I\'ve been working with git for a few weeks, but now I\'d like to contribute back to this open source project. I\'ve merged my work with the latest, remote by pulling editing ou

相关标签:
2条回答
  • 2021-01-30 09:25

    Use git format-patch origin/master. This creates a patch file for each commit on your checked out branch, which is not in origin/master.

    To have one file instead of multiple files you can use

    git format-patch master --stdout > mypatch.patch
    
    0 讨论(0)
  • 2021-01-30 09:27

    Use this to create one file containing all commits in your current branch that are not in the master branch:

    git format-patch master --stdout > mypatch.patch
    
    0 讨论(0)
提交回复
热议问题