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

Re: "submodule" mistake and a problem

From
Howard Miller <howardsmiller@gmail.com>
Date
Oct 1, 2012, 21:16 UTC
Message-ID
<CAHVO_90pLFWb87mFfDpC1ZDQR=jm2YYFj597=kwVPTEv4AA+yg@mail.gmail.com>
In-Reply-To
<5069C760.2020603@web.de>

I was not aware of git subtree. I'll go and do some reading. Thanks for the pointer!

On 1 October 2012 17:40, Jens Lehmann <Jens.Lehmann@web.de> wrote:
Show 22 quoted lines
>
> Am 01.10.2012 14:05, schrieb Howard Miller:
> >>
> >> Perhaps:
> >>
> >>   git rm -f --cached path/to/subdir   # remove from index, keep files
> >>   git add path/to/subdir
> >>
> >> -- Hannes
> >
> > Fantastic.... worked perfectly.  I'll write that down somewhere for
> > the next time I do it :)
> >
> > Is there a better way of handling sub-modules like that? I've looked
> > at git submodules but just got into more of a mess. It would be nice
> > to push a project complete with a (git) submodule upstream but it
> > seems tricky or impossible.
>
> Git submodules are distinct repositories by design, so you'd have to
> create an upstream repository for the submodule too to make that work.
> But I have the impression that you want to import another repository
> into a directory of your repo, so maybe git subtree is what you want.
Previous: Jens Lehmann
Message 5 of 5 in “"submodule" mistake and a problem”
  1. Howard MillerOct 1, 2012
  2. Johannes SixtOct 1, 2012
  3. Howard MillerOct 1, 2012
  4. Jens LehmannOct 1, 2012
  5. Howard MillerOct 1, 2012

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.