DVCSFilter: A less broken alternative to Git submodules?
January 18, 2013 12:27 PM   Subscribe

We keep our code in git. It's mostly great, except that we would like to include various external libraries in a more sophisticated fashion than "copy the files in" without hating our lives. I know people have come up with various alternatives to submodules. Does anyone have the experience to point me at one of these which is actually sane and will not make my coworkers want to murder me for introducing it to a shared project?
posted by brennen to Computers & Internet (5 answers total) 4 users marked this as a favorite
 
Do you need to be able to modify the actual code, and more specifically to push those modifications back up stream? If the answer is no to either of those then there may be a dependency management solution that makes more sense. What language are you writing in?
posted by kelseyq at 12:36 PM on January 18, 2013


Response by poster: Do you need to be able to modify the actual code, and more specifically to push those modifications back up stream?

Yes to both. We maintain an open subset of our own code in public, as well as using half a dozen third-party projects where we'd like making contributions upstream to be low-friction. At the moment, we are writing mostly PHP, JavaScript, and Ruby, with a scattering of other things. We have 7 or 8 active in-house contributors at any given time.

(I'll avoid threadsitting, but this seemed worth clarifying early on.)
posted by brennen at 12:46 PM on January 18, 2013


I've found that git submodules suck, but less so than all the alternatives. Sorry...

If you can standardize some scripts to wrap your environment, it might make them less painful -- i.e. write a 'sync' script that does a pull and git submodule update, or an 'update <modulename>' script that commits changes inside of a submodule, pushes them up and then commits the changed ref in the main repo.
posted by wrok at 1:04 PM on January 18, 2013


Best answer: I've never used it, but git subtree is often cited as a useful tool. It used to be a standalone tool but was merged into the contrib section of 1.7.11 (where it may not be built by default). More discussion.
posted by Nelson at 1:53 PM on January 18, 2013


Best answer: You may recall Joey Hess of git-annex-assistant / kickstarter fame.

This was not his first drive around the version control block. One such project relevent to your interests is mr, the external VCS dependency tool with an ungooglable name. This lets you document and tie repos together without nessecarily depending on a specific version, which is the massive pita we have with submodules.
posted by pwnguin at 2:06 PM on January 18, 2013


« Older Voice and words don't match   |   Spoiler filter - novels/scripts where the... Newer »
This thread is closed to new comments.