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

Re: Prepend the history of one git tree to another

From
RARyan Anderson <ryan@michonline.com>
Date
Feb 20, 2006, 10:57 UTC
Message-ID
<43F9A0B3.6020304@michonline.com>
In-Reply-To
<20060220104345.GG26454@cip.informatik.uni-erlangen.de>
Thomas Glanzmann wrote:
Show 23 quoted lines
>Hello Andreas,
>
>  
>
>>Something like this might do the trick, depending on how linear your 
>>ancestry graph is:
>>    
>>
>
>  
>
>>$ cd blastwave
>>$ first=$(git rev-list HEAD | tail -n 1)
>>$ git format-patch -k --stdout $first..HEAD > ../blw.mbox
>>$ cd ../blastwave.old
>>$ git am -k -3 ../blw.mbox
>>    
>>
>
>My graph is very linear. However. I have binaries checked into my tree.
>I am not sure if format-patch can handle this.
>  
>

I wrote a program called "graft-ripple", that takes a commit, and rewrites the current branch's history to reflect as if it started at that commit.

It doesn't ever actually work with diffs or anything, it just reads commits and trees and recreates them.

It's in the list archives, but I appear to have deleted it when I was cleaning up my archives.

http://www.gelato.unsw.edu.au/archives/git/0511/12965.html
Hope this helps!
-- 
Ryan Anderson
  sometimes Pug Majere
Previous: Thomas GlanzmannNext: Thomas Glanzmann
Message 4 of 6 in “Prepend the history of one git tree to another”
  1. Thomas GlanzmannFeb 20, 2006
  2. Andreas EricssonFeb 20, 2006
  3. Thomas GlanzmannFeb 20, 2006
  4. Ryan AndersonFeb 20, 2006
  5. Thomas GlanzmannFeb 20, 2006
  6. Johannes SchindelinFeb 20, 2006

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.