3 ms·
What's the use case for this? The way I see it is that `git submodule` and `git subtree` (and it's much better variant git subrepo) have two different optimal
by bryanlarsen 7y ago
What's the use case for this? The way I see it is that `git submodule` and `git subtree` (and it's much better variant git subrepo) have two different optimal use cases with a huge amount of grey area in between.
Git subtree is your better option if your repo is one logical thing, and git submodule is your better option if you repo is a sparse collection of things.
AFAICT, git subtrac is aimed more at the git subtree / git subrepo use case since it stores the submodule commits in the parent repo? If so, what are the pros & cons versus git subrepo?
https://github.com/ingydotnet/git-subrepo https://github.com/ingydotnet/git-subrepo
- fanf2 7y agoMy understanding is that git-subtrac is more like git-submodule, except that the submodule repository histories are copied into the parent repo (separate from the parent repo history) and tracked using an auxiliary .trac branch. I guess subtrac is short for submodule tracker.
- bryanlarsen 7y agoI really don't care what the underlying technology is, just more about how the design decisions affect it's applicability to my use cases. For example, one advantage of git submodules over git subrepo is that it allows much smaller repositories. Since subtrac copies the commits into the parent repo, it doesn't have that advantage. That's one reason among several why I say that subtrac looks more like subrepo even though it's built on submodule tech.
- unqueued 7y ago> For example, one advantage of git submodules over git subrepo is that it allows much smaller repositories. Since subtrac copies the commits into the parent repo, it doesn't have that advantage. I don't think there would be a size benefit regardless, since you would still be cloning the submodule from somewhere. There are good reasons why you would want the contents of a submodule to remain a submodule. If you have a documentation wiki, or some sort of helper program, or a data repo, you would probably be better having it be a submodule. But submodules are awkward for a variety of reasons.