I am working on a Magento store (SVN repo connected to Git) utilizing the fabulous HTML5 Boilerplate based Magento-Boilerplate theme (GitHub repo) and extending it with my own child theme (private Git Repo). These all exist in a single www folder which happens to be the top level directory for all three projects. I would like to cleanly integrate all of these into their respective repositories, but the only solutions for multiple repositories in a single directory that I have found are submodules (which I love the idea of, but as far as I can tell require each project to be in a subfolder of the main Git repo) and symlinking the files into place (should work, but a bit messy and rather annoying to keep up).
Is there a clean way to get this done? Here is an example of my folder structure. I have denoted in which repo(s) each file/directory resides – M = Magento, B = Boilerplate, P = Private:
/www
|-- app [M]
|-- frontend [M]
|-- base [M]
|-- magento-boilerplate [B]
|-- default [B]
|-- myprivatetheme [P]
|-- skin [M]
|-- frontend [M]
|-- base [M]
|-- magento-boilerplate [B]
|-- default [B]
|-- myprivatetheme [P]
|-- .htaccess [M][B][P]
|-- favicon.ico [M][P]
As you can see, even without the whole .htaccess and favicon.ico being in multiple repositories mess (I would just gitignore or –assume-unchanged them in the Magento and Boilerplate repos and use my private one for them) the top level directory is www due to the way that Magento splits code and themes into separate folders with a common parent of www. Due to that you can even technically say that the app, skin, and various frontend folders exist in multiple repos as well, since they must exist in each repo all the way up to the top level directory for structure.
Is sym-linking these repos in from separate folders my only solution? It’s not a huge problem, but I would be really interested to know if Git is flexible enough to deal with my case. It looks like modman may have been created specifically to aid in this symlinking issue.
I confirm there is no easy way to map a Git repo structure to a deployment structure (which is essentially what your folder structure shows: a deployment into a web folder)
“modman” seems to be a valid way to automate, but you need to remember that if you do any change in one of those submodules, you will need to commit them, push them to their respective upstream, and go to the parent git repo, commit again and push.
All that doesn’t seem to be taken into account by modman.
The OP Colt McCormack reports studying modgit: