3 ms·
I think submodules make sense in a lot of use cases, but a gotcha I saw with a team introduced to them recently is that pulling down from a branch or switching
by samtheprogram 2y ago
I think submodules make sense in a lot of use cases, but a gotcha I saw with a team introduced to them recently is that pulling down from a branch or switching branches doesn’t update the submodule and/or stop you from changing branches if it is modified without being committed in some way.
If I could have submodules that operated that way I think submodules would be a lot more straightforward to newcomers.
- helix278 2y agoYou might find this git option helpful: https://git-scm.com/docs/git-config#Documentation/git-config.txt-submodulerecurse https://git-scm.com/docs/git-config#Documentation/git-config...
- helix278 2y agoNote that this won't solve all cases. For example, you still have to watch out when merging branches with different submodule commit hashes that you run submodule update while merging.
- jayd16 2y agoYup, submodules are actually ok. Like with most git issues, it's more of a tooling UX problem then an architecture deficiency.