我在同一个分支的git中有两个标签。它们之间至少有5-6个提交。如何在两个标记之间创建一个补丁,以便将其应用于GitHub代码库?
发布于 2012-01-31 19:51:32
您可以使用以下命令在两个标记之间创建单个差异(补丁
$ git diff tag1 tag2 -- > the-patch.diff将tag1和tag2替换为所需的标记。
发布于 2012-12-02 03:52:04
通过使用--stdout选项并将输出定向到文件,您可以为多个提交创建单个补丁:
git checkout tag2
git format-patch tag1 --stdout > patch1to2.patchhttps://stackoverflow.com/questions/9078820
复制相似问题