From: Avery Pennarun Date: Tue, 16 Feb 2010 17:48:16 GMT Subject: Re: Git Submodule Usage Pattern Message-ID: <32541b131002160948h317e71f5m2d2cb839470a38f1@mail.gmail.com> In-Reply-To: On Tue, Feb 16, 2010 at 9:39 AM, Tim Visher wrote: > Apparently, submodules are not configured on a per-repo basis, unless > I'm totally misunderstanding something.  The .gitmodules file wants to > be checked in just like .gitignore, etc.  I don't know if submodules > will work correctly without syncing that between repos, either.  What > I need is to have the submodule at work point at a different repo than > the submodule at Home to avoid firewall issues.  Or for someone to > suggest a different work flow that would allow me to have my main home > repo point at GitHub using my private git:// address and the > zen-and-art repo using it's public git:// clone address and then have > my Work repo clone from GitHub around the firewall (or somewhere else, > GitHub's http cloning is still pretty Janky) but then push to the > Stick. Three suggestions I can offer: 1) After running 'git submodule init', look in .git/config. You can change which repos the submodules point to from there, on a per-repo basis, and not affect other people's checkouts. 2) Try using relative repo paths (like ../foo.git) in .gitmodules. Then as long as your repositories are siblings of each other, if you can check out one you can check out the other. 3) git-subtree (http://github.com/apenwarr/git-subtree) does not exhibit this problem. Have fun, Avery