I've been using the git subtree extension (https://github.com/apenwarr/git-subtree) . I use "--squash" to make the log of main project clean, my steps like this:
add lib into main project
git subtree add -P sub/libdir --squash lib_remote master
get update from lib
git subtree pull -P sub/libdir --squash lib_remote master
push changes to lib_remote
git subtree push -P sub/libdir --squash lib_remote master
It works very well for me(both main project and lib, have a history make good sense). The problem is the time of git subtree push, becomes longer and longer.
My purpose of using git-subtree is almost the same with Screndib, who asked git-subtree is not retaining history so I cannot push subtree changes, how can I fix this/avoid this issue in the future?
I guess, when using --squash, every time to process a push , git subtree needs to search the whole history since the "subtree add".
How can I reduce the time of subtree push? Or make it work more effective, rather than the whole history, only process changes since last git subtree push(or pull)?
--squash
is not available forgit subtree push