5 ms·
I use submodules and they work fine. What is so bad about them that I shouldn't be using them?
by riscy 10y ago
I use submodules and they work fine. What is so bad about them that I shouldn't be using them?
- ithkuil 10y agoHere's some good posts about submodules and alternatives, so you can make up your own mind: http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/ http://blogs.atlassian.com/2013/05/alternatives-to-git-submo... https://codingkilledthecat.wordpress.com/2012/04/28/why-your-company-shouldnt-use-git-submodules/ https://codingkilledthecat.wordpress.com/2012/04/28/why-your...
- riscy 10y agoFrom what I've gathered skimming the numerous blog posts venting about submodules, it seems that people have trouble with submodules because they are trying to integrate them into a workflow they work poorly in (i.e., rapidly changing modules). There seems to be room for improvement for that type of usage, given what people are saying, but I wonder if there have been any changes to submodules since those posts (many of them are dated around 2011-2012). My own positive experience with submodules involves dependencies that only occasionally change; I can always point to a specific tag that should be used.
- mnsc 10y agoHow do you point to a specific tag? Do you set branch : (tag)?
- Ace17 10y agoYes. One should avoid to extract a component from the repo as a submodule too early, i.e when the interface of the component is not mostly stabilized. If each commit in your "main" module is paired with a commit in your submodules, then you might be missing the point of module separation.
- Too 10y agoEven if the interface is stabilized, when you update implementation of a submodule you will still have to recursively update all submodules from main down to the changed module.