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

History rewriting swiss army knife

From
Petr Baudis <pasky@suse.cz>
Date
Mar 24, 2006, 14:08 UTC
Message-ID
<20060324140831.GY18185@pasky.or.cz>
  Hi,
  it is not very frequent, but sometimes you really want to rewrite your
history - you need to get rid of a copyright violation or a file with
confidential information slipped through, or who knows what other good
reason you might have. As long as you are aware of the implications of
all the tree/commit ids getting different, why not.
  It's never been so easy before - I've written cg-admin-rewritehist,
which will execute your filters for each commit (which can rewrite the
tree contents, just the tree itself through the index, committer/author
information and commit message) while the script will obviously preserve
all the other information like merges, author/committer information etc.
The script will place the rewritten history on a newly created branch.
  If you are interested, you can also look at the script at
	http://kernel.org/git/?p=cogito/cogito.git;a=blob;f=cg-admin-rewritehist
but it has few Cogito dependencies.
  Have fun,
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
Next: Junio C Hamano
Message 1 of 3 in “History rewriting swiss army knife”
  1. Petr BaudisMar 24, 2006
  2. Junio C HamanoMar 24, 2006
  3. Petr BaudisMar 26, 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.