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

Re: Splitting up a repository

From
EDEvan Driscoll <driscoll@cs.wisc.edu>
Date
Dec 4, 2010, 06:19 UTC
Message-ID
<4CF9DD5E.7020400@cs.wisc.edu>
In-Reply-To
<20101204053304.GA7311@sigill.intra.peff.net>
On 12/3/2010 23:33, Jeff King wrote:
Show 7 quoted lines
>> Is there a better way than making several (recursive) copies of the
>> repository, deleting all but one directory in each copy, then moving the
>> contents of that directory up a level? (And perhaps setting up a Git
>> superproject at the original location. I do know about that.)
> 
> Rewrite the history of each directory with git-filter-branch. It even
> has a "--subdirectory-filter" option that will do exactly what you want.

Great, thanks. I had to mess around with a submodule that was inside one of the subdirectories that didn't make it through the history rewrite, and I could see that have getting slightly hairy, but at least in my case it was pretty simple. Other than that, worked like a charm.

Evan
Previous: Jeff KingNext: Nguyen Thai Ngoc Duy
Message 3 of 6 in “Splitting up a repository”
  1. Evan DriscollDec 4, 2010
  2. Jeff KingDec 4, 2010
  3. Evan DriscollDec 4, 2010
  4. Nguyen Thai Ngoc DuyDec 4, 2010
  5. Evan DriscollDec 4, 2010
  6. Nguyen Thai Ngoc DuyDec 4, 2010

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.