Mastering Git submodules
medium.com
Mastering Git submodules
1–10 of 33 posts
Re: Mastering Git submodules
#2Re: Mastering Git submodules
#3On the other hand, if the technological context allows for packaging and formal dependency management, you should absolutely go this route instead: it lets you better split your codebase, avoid a number of side effects and pitfalls that litter the submodule space, and let you benefit from versioning schemes such as semantic versioning (semver) for your dependencies.
Re: Mastering Git submodules
#4Some of this caveats are kinda surprising for me, coming from a Mercurial background:
* Every time you add a submodule, change its remote’s URL, or change the referenced commit for it, you demand a manual update by every collaborator. Forgetting this explicit update can result in silent regressions of the submodule’s referenced commit. -- This is something handled automatically in Mercurial. Is there any reason why the same behaviour is not used in Git?
* Commands such as status and diff display precious little info about submodules by default. -- This should be possible to implement, no? It's also something that's available in Mercurial (using the --subrepos flag), and it's a huge boost to usability.
Re: Mastering Git submodules
#5[1] https://github.com/ingydotnet/git-subrepo/blob/master/Intro....
Re: Mastering Git submodules
#6Re: Mastering Git submodules
#7[1]: http://blogs.atlassian.com/2013/05/alternatives-to-git-submo...
P.S.: Since when is GoDoc a dependency manager for Go?
Re: Mastering Git submodules
#8For a less painful [1] solution, see git-subrepo. [2] [1] https://github.com/ingydotnet/git-subrepo/blob/master/Intro.... [2] https://github.com/ingydotnet/git-subrepo
But on the whole, it is often less painful than submodules. I haven't tried subtree yet, will do that next :-)
Re: Mastering Git submodules
#9Interesting overview! Some of this caveats are kinda surprising for me, coming from a Mercurial background: * Every time you add a submodule, change its remote’s URL, or change the referenced commit for it, you demand a manual update by every collaborator. Forgetting this explicit update can result in silent regressions of the submodule’s referenced commit. -- This is something handled automatically in Mercurial. Is…
Not just them. git archive and git grep for example totally ignore submodules. The whole thing is bolted on, with minimal integration into the core commands. So, usually something to avoid.
Re: Mastering Git submodules
#10After a fresh developer has cloned the super project, they just run the `./setup` shell script and it will inform them of any dependencies their system doesn't meet and then start the docker provisioning process. All subprojects have docker containers associated with them, and we have shell scripts that launch all docker containers and link them together.
A new developer can cold provision the entire cluster on their laptop in a matter of minutes, pretty neat :)