简体   繁体   English

git format-patch查询

[英]git format-patch query

I am trying to create a patch through git between master and my working branch. 我正在尝试通过git在master和我的工作分支之间创建一个补丁。 I used following command: 我使用以下命令:
git format-patch master..workingbr
But it is creating incremental patches for all the intermediate commits. 但是它正在为所有中间提交创建增量补丁。 I wanted to create a single patch for the difference between master branch and current working branch. 我想为master分支和当前工作分支之间的差异创建一个补丁。

from the man page - git format-patch - Prepare each commit with its patch in one file per commit,.. 从手册页git format-patch patch-在每次提交的一个文件中准备每个提交及其补丁。

So, if you want a single patch, you do need to create a single commit that squashes your series together, probably on a separate branch, as per VonC's comments. 因此,如果您只需要一个补丁,则确实需要创建一个提交,以按照VonC的评论将您的系列压缩在一起,可能在一个单独的分支上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM