简体   繁体   English

如何使用Sourcetree创建跨越提交的补丁?

[英]How can I create a patch that spans commits using Sourcetree?

I observe that when I "Create a patch", the dialog creates the patch that is "to" the commit I selected "from" it's predecessor. 我观察到当我“创建一个补丁”时,该对话框会创建一个补丁,它是“我”从它的前任“选择”的提交。

In the dialog, I can tantalisingly select two separate commits and the diff panel shows the diffs that are between those two - that's the patch that I want. 在对话框中,我可以诱惑地选择两个单独的提交,差异面板显示两者之间的差异 - 这就是我想要的补丁。

But when I press "OK", I still get the single commit patch. 但是当我按“OK”时,我仍然得到单个提交补丁。

Is there some way to achieve what I meant, using Sourcetree? 有没有办法实现我的意思,使用Sourcetree?

(note: it might be nice to have a "sourcetree" tag?) (注意:拥有“sourcetree”标签可能会很好吗?)

您可以使用git diff oldHash..newHash > file.patch命令获取多个提交的单个补丁。

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

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