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

Re: git am from scratch

From
AGAndreas Gruenbacher <agruen@suse.de>
Date
Mar 19, 2009, 20:42 UTC
Message-ID
<200903192142.49754.agruen@suse.de>
In-Reply-To
<20090319201817.GE17028@coredump.intra.peff.net>
On Thursday, 19 March 2009 21:18:17 Jeff King wrote:
> I don't think this has ever worked in any version of git.

I did find a way to help myself in the end. Still it was still a major, unnecessary annoyance.

I ran into this problem when trying to reconstruct a project's history (after going RCS -> CVS -> git many things were still wrong like unrelated RCS files which ended up in the history, RCS files being moved to the Attic in the original tree to indicate deletes [which means they will happily live on from a CVS point of view], etc.).

The easiest way I could find how to get rid of all the mess without going totally insane was to git-format-patch the repository, fix up the major things in the mbox, and then recreate the history.

In the end I ended up preparing the initial commit by hand followed by "commit -c HASH" to preserve the metadata. (The cvsimport branch had a different commit at its tip, so I couldn't use commit --amend on that.) After that, I git-am'ed the rest of the mbox onto that reconstructed commit. This could have been significantly easier.

> There are many other ways to do this.
That's really not the point. Thanks though.
Andreas
Previous: Jeff KingNext: Jeff King
Message 4 of 8 in “git am from scratch”
  1. Andreas GruenbacherMar 19, 2009
  2. Eric RaibleMar 19, 2009
  3. Jeff KingMar 19, 2009
  4. Andreas GruenbacherMar 19, 2009
  5. Jeff KingMar 19, 2009
  6. Junio C HamanoMar 19, 2009
  7. Andreas GruenbacherMar 20, 2009
  8. Jeff KingMar 20, 2009

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.