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

Re: Submodules: Publishing a locally created submodule.

From
Sean Estabrooks <seanlkml@sympatico.ca>
Date
Jul 24, 2008, 16:21 UTC
Message-ID
<BLU0-SMTP14B7D0278740B42D339433AE870@phx.gbl>
In-Reply-To
<18071eea0807240840g79da962ci8fbc65546d496323@mail.gmail.com>

On Thu, 24 Jul 2008 16:40:43 +0100 "Thomas Adam" <thomas.adam22@gmail.com> wrote:

> Now:  I want to make mysubmoduleB a submodule which I can publish to
> the shared repository and when others pull, to see that submodule and
> be able to treat it as such.
Hi Thomas,

Submodules are very much fully formed independent repositories. So the first step is to create a new Git repo that holds the files you want. Publish this repo in a public place, presumably the same place you published your other submodules.

In your supermodule use "git submodule add" to include the new public repo as a submodule in the directory of your choice. After which you can commit the change and push it out. Other people will need to do "git submodule update" to make their repos aware of the new submodule.

HTH, Sean

Previous: Thomas AdamNext: Mark Levedahl
Message 2 of 4 in “Submodules: Publishing a locally created submodule.”
  1. Thomas AdamJul 24, 2008
  2. Sean EstabrooksJul 24, 2008
  3. Mark LevedahlJul 24, 2008
  4. Thomas AdamJul 25, 2008

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.