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

Re: [RFC] git submodule split

From
Michal Sojka <sojkam1@fel.cvut.cz>
Date
Apr 6, 2014, 21:18 UTC
Message-ID
<87d2gukvhb.fsf@steelpick.2x.cz>
In-Reply-To
<53417C00.3090805@web.de>
On Sun, Apr 06 2014, Jens Lehmann wrote:
Show 22 quoted lines
> Am 02.04.2014 23:52, schrieb Michal Sojka:
>> Hello,
>> 
>> I needed to convert a subdirectory of a repo to a submodule and have the
>> histories of both repos linked together. I found that this was discussed
>> few years back [1], but the code seemed quite complicated and was not
>> merged.
>> 
>> [1]: http://git.661346.n2.nabble.com/RFC-What-s-the-best-UI-for-git-submodule-split-tp2318127.html
>> 
>> Now, the situation is better, because git subtree can already do most of
>> the work. Below is a script that I used to split a submodule from my
>> repo. It basically consist of a call to 'git subtree split' followed by
>> 'git filter-branch' to link the histories together.
>> 
>> I'd like to get some initial feedback on it before attempting to
>> integrate it with git sources (i.e. writing tests and doc). What do you
>> think?
>
> Why do want to rewrite the whole history of the superproject,
> wouldn't it suffice to turn a directory into a submodule with
> the same content in a simple commit? 

I wanted to publish a project including its history but a part of that project could not be made public due to legal reasons. Putting that part into submodule seemed like best idea.

-Michal
Previous: Jens LehmannNext: Jens Lehmann
Message 3 of 4 in “[RFC] git submodule split”
  1. Michal SojkaApr 2, 2014
  2. Jens LehmannApr 6, 2014
  3. Michal SojkaApr 6, 2014
  4. Jens LehmannApr 7, 2014

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.