我想把两个文件从一个代码库移到另一个代码库。原始添加的文件如下所示:
我已经找到了影响
/src/init/Price.cs
/tests/init/PriceTests.cs
/src/init/PriceValue.cs
/tests/init/PriceValueTests.cs
/src/moved/PriceValue.cs
/tests/moved/PriceValueTests.cs
我已经找到了影响
PriceValue.cs
(经过重命名和移动)的所有提交ID,但将这些ID传递给Git会出现以下错误消息:$ git format-patch -o /tmp/pricevaluepatches $(git log --all dfeeb 6966b 9f882 …)
-bash: /usr/local/bin/git: Argument list too long
那么,我该如何创建一个补丁集,仅包含对所提到的文件的更改,但跨越每个文件的一次重命名和一次移动?
ids.txt
的文件中(每行一个),然后运行cat ids.txt | xargs git format-patch -o /tmp/pricevaluepatches
吗? - Nils Wernergit log --all ...
。简单的git format-patch -o /tmp/pricevaluepatches dfeeb 6966b 9f882 …
即可满足需求。 - Nils Werner--filter-branch
操作? - Asbjørn Ulsberg