使用 git-subtree
,在运行 git subtree split
时要计算的差异数量会随着时间的推移而增加,达到可能导致拆分花费很长时间的值。
解决这个问题的一种方法是 git rm
路径,提交它,然后 git subtree add
它回来。
是否有更简单/更清晰的重置子树的方法?
最佳答案
在进行拆分时,可以使用 --rejoin
选项,它的存在似乎正是为了重用已经发生的拆分。
--rejoin::
This option is only valid for the split command.
After splitting, merge the newly created synthetic history back into your main project. That way, future splits can search only the part of history that has been added since the most recent --rejoin.
来自 https://github.com/apenwarr/git-subtree/blob/master/git-subtree.txt
关于git - 重置 git 子树中的差异计数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14051555/