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

Re: Modify/edit old commit messages

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 1, 2007, 12:28 UTC
Message-ID
<Pine.LNX.4.63.0702011326130.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<20070201114909.GV8705@enneenne.com>
Hi,
On Thu, 1 Feb 2007, Rodolfo Giometti wrote:
> I'm puzzled... how can I modify or edit old commit messages? :)
Short answer: you can't.

Slightly longer answer: since the object name is calculated from data including the commit message, there is no way you can change it.

However, you can start from a certain commit in history, and _recommit_ a commit. There, you can edit the message and rebase the other commits on top of it. NOTE: the resulting commit is _not_ easily mergeable for people who track your branch.

Hth, Dscho

Previous: Rodolfo GiomettiNext: Linus Torvalds
Message 2 of 5 in “Modify/edit old commit messages”
  1. Rodolfo GiomettiFeb 1, 2007
  2. Johannes SchindelinFeb 1, 2007
  3. Linus TorvaldsFeb 1, 2007
  4. Johannes SchindelinFeb 1, 2007
  5. Jakub NarebskiFeb 1, 2007

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.