Вопрос

Using git-subtree, the number of diffs to calculate when running a git subtree split increases over time, reaching values that can make a split take very long.

One way to fix that is to git rm the path, commit it and then git subtree add it back.

Is there a simpler/cleaner way of resetting a subtree?

Это было полезно?

Решение

When doing the split the --rejoin option can be used, which seems to exist exactly to reuse the splits that have already happened.

--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.

From https://github.com/apenwarr/git-subtree/blob/master/git-subtree.txt

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top