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

Re: git-svn: Handling of branches created from subfolders

From
Andreas Heiduk <asheiduk@gmail.com>
Date
Aug 20, 2017, 10:27 UTC
Message-ID
<8c910a5b-ed96-41d4-d157-f138af51011f@gmail.com>
In-Reply-To
<1ED00C5D-177C-4F95-8261-BFB7345B7C08@gmail.com>
Am 19.08.2017 um 14:45 schrieb Jan Teske:
> Is there any way to fix such branches from subfolders in a way that they integrate correctly with the converted git repository, without losing any (or at least too much) history? If this is not possible with git-svn directly, maybe I could prepare the SVN repo or post-process the converted git repository somehow?

You can use `git replace --graft` to connect the first commit of the loose branches with their source. After all connections are in place you can use `git filter-branch` to make the replacements permanent.

This will not change the content or directory structure of branch1 or branch2 but the diff with their parent commits will show up as a huge delete/rename operation. So merging/Cherry-picking between trunk and branch1/branch2 will be ... challenging.

Previous: Jan TeskeNext: Jan Teske
Message 2 of 3 in “git-svn: Handling of branches created from subfolders”
  1. Jan TeskeAug 19, 2017
  2. Andreas HeidukAug 20, 2017
  3. Jan TeskeAug 20, 2017

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.