git/list[1] front-page[2] threads[3] people[4] search[5] about
 

submodules for different deployment directories?

From
SCShaun Cutts <scutts@entropycap.com>
Date
Mar 19, 2009, 08:33 UTC
Message-ID
<F042F333-32C4-4B0E-AB1A-4524AB1D9654@entropycap.com>
Hello,
We are currently migrating from svn....

We have a growing project that is deployed differently in various places. The deployment-specific stuff is in a subdirectory called "deployment".

In svn, we used svn switch to point that subdirectory at a different tag. Then "update" on the overall tree left alone the switched parts at the various different installations. We could "push" changes in any overall copy of the project and the differences between the switched subdirectories would be immaterial.

It would seem (to me at least) that the equivalent functionality is provided by "submodule" in git.

Accordingly I started a separate project with different branches corresponding to the different deployment models.

I added this a submodule to the main project. In fact, we are thinking of organizing some other things that differ by install this way, so I made the actual directory a subdirectory of the "deployment" project, which I "submodule added" to the various installations as a submodule off the root repository, then used "ln -s" to link that subdirectory into the appropriate place in the overall tree. (Is this a mistake?)

However, I'm not sure its working right. It seems that the various overall repositories differ, even if only really the submodule's branch differs. Also a diff comes up with lots of differences between the submodules's trees. (Aside: where is the branch of the submodule written down in the overall module -- if you add with -b... is this just "transient info"?) But I thought that the idea of submodules were that they are opaque?

I would enjoy help figuring out what is going on. I would be most grateful, however, to learn how I'm *supposed* to do in this situation.

-- Shaun Cutts

---------------- Shaun Cutts Partner Entropy Capital, LLC scutts@entropycap.com

Message 1 of 1 in “submodules for different deployment directories?”
  1. Shaun CuttsMar 19, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.