How can I reduce the ever-increasing time to push a subtree?

Try using the --rejoin flag, so that after the split the subtree is correctly merged back to your main repository. This way each split needs not to go through all history.

git subtree split --rejoin --prefix=<prefix> <commit...>

From the original subtree documentation:

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.

Leave a Comment