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

Re: Edit log message after commit

From
BGBrian Gerst <bgerst@didntduck.org>
Date
Sep 29, 2005, 04:58 UTC
Message-ID
<433B7459.3040307@didntduck.org>
In-Reply-To
<dhfjcu$36f$1@sea.gmane.org>
Kevin Leung wrote:
> Hi,
> 
> Is there any method to edit the log message after committed? I couldn't 
> find any information in Documentation and in git mailing list.

The commit must be at the head, or else you can't change it without breaking the chain of following commits. If you are using Cogito, use cg-admin-uncommit and then re-commit it. Otherwise, create a new commit object for the same tree and parent(s) as the old commit, with the new message. The new commit object is your new head.

--
				Brian Gerst
Previous: Tony LuckNext: Kevin Leung
Message 4 of 9 in “Edit log message after commit”
  1. Kevin LeungSep 29, 2005
  2. Junio C HamanoSep 29, 2005
  3. Tony LuckSep 29, 2005
  4. Brian GerstSep 29, 2005
  5. Kevin LeungSep 29, 2005
  6. Yasushi SHOJISep 29, 2005
  7. Junio C HamanoSep 30, 2005
  8. Catalin MarinasSep 29, 2005
  9. Kevin LeungSep 30, 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.