Bringing other libraries into my project is beneficial because then my build system is able to wrangle those just as easily as my code. (And it's also simply useful in the case where I've written both modules but maintain a separation for whatever reason--one is an open-source project and the other is not, whatever--to be able to make changes to one from within the other, run the tests for the submodule, and push it up to staging or upstream, without having to leave my current project.)
After you have divided your project into independent modules you have agreed that the changes in these modules are going to have minimal impact on each other, then what exactly is the point of merging the history of all those changes?.In my use case that would actually create a bigger mess.
Now I think this could perhaps be useful if there are modules that I have forked from elsewhere and the fork is going to be used in my project only.Although even then I dont see any downside of using submodules.
The downside of submodules is lack of good commands .For example a command to check out a different branch of each of my submodules - the branch which is used in this project.This could be done using the -for-each tag but its not trivial.
EDIT:In this thread zbowling makes a great argument against submodules.
There is a horrible habit of people forking projects on github just so their submodule stay stable
I don't think you should ever want to bring unreliable external components, like a random github project that you aren't actively contributing to, into your tree like that.
Funny, I thought this was the beginning of an argument agreeing with me. :)
* https://github.com/altercation/solarized
* https://github.com/altercation/vim-colors-solarized
The vim-colors-solarized repo is a subtree of the solarized repo. This is mostly a convenience for vim users that use something like pathogen + git-submodule to keep their plugins up-to-date. This way you can create a submodule @ ~/.vim/bundle/vim-colors-solarized and it would be the root of the bundle tree. If the vim colorscheme was only part of the larger repo, then users would be forced to create their own repos, or else do something like: git submodule .vim/bundle/.vim-colors-solarized
ln -s .vim-colors-solarized/vim-colors-solarized .vim/bundle/Different versions of your code could rely on different versions of the library (e.g. you update your code to a newer version of the library.) So which version of the library you rely on also needs to be version-controlled.
This gets even more fun when you have a second project that needs an incompatible fork of the same library.
Why must some other library/module be part of my project? Why not reference and maintain the external lib/mod externally? We've been doing that for decades. It seems a solved problem.
Bringing an external library within the fold of your project feels like unnecessary coupling.