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

Re: Replay on arbitrary branches

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Sep 3, 2005, 02:17 UTC
Message-ID
<46a038f90509021917e0833a2@mail.gmail.com>
In-Reply-To
<7vwtlydisj.fsf@assigned-by-dhcp.cox.net>

Agreed on the impossibility of 3-way merges with binary files. In the branch I want to replay, though, I have commits that add and change binary files.

> About 'unrelated' trees, if you know of a good tree you can use
<setup snipped>
Show 6 quoted lines
>     $ git-read-tree -m -u c master b
>     $ git-merge-cache -o git-merge-one-file-script -a
> 
> If the resulting tree looks reasonable, you could now commit it
> telling 'git-commit-tree' that the parents of the new commit are
> master and b, and you practically merged two projects.

Cool! I think this is what I was looking for. The call to git-read-tree will act as if A and B had branched off at tree "C". I'll have to read the doco on git-read-tree and git-merge-cache a bit more to feel comfortable with this voodoo, but it's great.

cheers,
martin
Previous: Junio C Hamano
Message 3 of 3 in “Replay on arbitrary branches”
  1. Martin LanghoffSep 3, 2005
  2. Junio C HamanoSep 3, 2005
  3. Martin LanghoffSep 3, 2005

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.