5 ms·
Submodules are amazing until you start using them. The whole idea on paper looks brilliant, but the pitfalls are very painful. Perhaps if you're working solo
by ranting-moth 4y ago
Submodules are amazing until you start using them.
The whole idea on paper looks brilliant, but the pitfalls are very painful.
Perhaps if you're working solo on a project it's OK. Part of the problem is that developers aren't used to submodules and it behaves in a way you don't envisage.
- okamiueru 4y ago> Part of the problem is that developers aren't used to submodules and it behaves in a way you don't envisage. I would say you correctly identify the problem, but draw the wrong conclusion. Developers should be able to work with the right tools for the right problems. I've used git submodules in teams, professionally, for more than a decade. Neither I nor my colleagues have ever had a problem with them except when used without the proper understanding. The solution isn't to replace the tool, but teach developers how to use it.
- hobofan 4y ago> The solution isn't to replace the tool, but teach developers how to use it. Or to improve the tool to have it teach developers and be more helpful in case of common errors. I think in many non-submodule parts git has improved on that front, though that has never been its strength.
- ofrzeta 4y agoYeah, it works. You just have to remember, if it doesn't, in doubt use "git submodule update", or if this doesn't cut it use "git submodule update --init --recursive". Or maybe you should have run "git submodule sync" first? :) However I agree with others in this thread that it's easier to develop a bunch of modules that are used in a top-level project. Just change to the subdirectories, change the files, then when you are done commit the subprojects then commit the submodules commit ids to the parent project.
- baby 4y ago> Neither I nor my colleagues have ever had a problem with them It really is like we live in different worlds.