git - 重置 git 子树中的差异计数

标签 git subtree

使用 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/

相关文章:

git - 撤消 git pull --rebase?

git - 更改所有提交的 git 作者信息对我的一个存储库有效,但对其他存储库无效,为什么?

git - 如何删除 git 子树引用

git - 当我们使用子树 merge 策略时,git如何找到子树?

git - TortoiseGit 是否允许选择性暂存,如 git-gui?

git - git子模块分支是否与主项目的分支一起切换?

git - 如何恢复推送的提交?

git - 将库开发转移到自己的项目中

git - git 子树推送失败,输出疯狂