Re: Submodules: Publishing a locally created submodule.
- From
Thomas Adam <thomas.adam22@gmail.com>
- Date
- Jul 25, 2008, 00:05 UTC
- Message-ID
- <18071eea0807241705j1359bc7ei46d74540d9090f6d@mail.gmail.com>
- In-Reply-To
- <48891088.40709@gmail.com>
Hello --
2008/7/25 Mark Levedahl <mlevedahl@gmail.com>:
> git submodule add <URL where this will exist> ./mysubmoduleB > > will recognize that mysubmoduleB is already a valid git repo and add it as > is at the current location to the superproject.
Ah -- now that was missing from the documentation (the syntax; not the intention.) Thanks.
It seems my brain has turned to mush so I need to go back to square one and verify the steps for this are accurate. If I am doing this arse-about-face, do say. ;)
I've mentioned I am using a bare repository which is shared amongst developers. We've been using one fine for normal development and for various reaons I am creating a new repository to be filled with submodules. I shall call this "SM".
Our "superproject" is a directory hierarchy with interspersed files. On the server I did this:
server% cd /usr/src/SM server% git init server% cd ./superproject server% git init server% git add . server% git commit -m "Initial checkin" server% cd .. server% git submodule add /path/to/usr/src/SM server% git commit -a -m "Submodules..."
Then cloned a bare repo from that which I was able to clone locally and do stuff in. I could push stuff out too for that one project. But how from this clone do I then publish any further submodules I might create locally? I can't very well do so directly in my checkout -- it has no concept of where the submodules are. I could go to the server, add another directory as a submodule (as I've done with "superproject" above --- but then any changes under /usr/src/SM on the server are local -- the bare repo has no knowledge of any changes made there.
Does this even make sense? ;)
Thanks in advance.
-- Thomas Adam