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

Re: dependable submodules

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 20, 2011, 04:27 UTC
Message-ID
<7vd3lmv2k1.fsf@alter.siamese.dyndns.org>
In-Reply-To
<AANLkTi=JVO+KhnLKR-PvNQQFaZLhUmiVbKFxuytYEpmc@mail.gmail.com>
Daniel <daniel@netwalk.org> writes:
Show 8 quoted lines
> IOW, I may have
>
>     myrepo/somefile.txt
>     myrepo/another_project/.git/...
>     myrepo/another_project/another_project_file.txt
>
> and I'd like to, when I clone repo, to be able to get all files from
> repo independently of the remote repo's existence.

Cloned repositories from your repository can say where they get from "another_project" embedded in it in .git/config of the clone of the superproject. The supermodule may have .gitmodules that points at github or whereever your original upstream repository resided, but that is supposed to be used to only give you the default.

When "another_project" you borrowed really dies and becomes useless for anybody, you may update its entry in .gitmodules of the superproject to point at the public repository that inherited that submodule project. The project might be simply abandoned, in which case you end up being that inheritor.

Previous: DanielNext: Daniel
Message 2 of 11 in “dependable submodules”
  1. DanielMar 20, 2011
  2. Junio C HamanoMar 20, 2011
  3. DanielMar 20, 2011
  4. Jens LehmannMar 20, 2011
  5. DanielMar 20, 2011
  6. Robert PollakMar 21, 2011
  7. DanielMar 22, 2011
  8. Avery PennarunMar 22, 2011
  9. in-gitvger@baka.orgMar 22, 2011
  10. DanielMar 22, 2011
  11. Jens LehmannMar 22, 2011

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.