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

Re: how to edit commit message in history

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 16, 2009, 11:18 UTC
Message-ID
<m34ozzzegn.fsf@localhost.localdomain>
In-Reply-To
<20090116035714.GA6984@b2j>
bill lam <cbill.lam@gmail.com> writes:
> I made some typos in commit messages, how to edit them without
> affecting everything else?

If it is last commit that you want to edit, and if you didn't publish this commit to soem public repository, you can simply use

  $ git commit --amend

If the commit is deeper in history, use "git rebase --interactive". If you published commit, you are out of luck.

See http://git.or.cz/gitwiki/GitTips
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: thestar@fussycoder.id.au
Message 4 of 4 in “how to edit commit message in history”
  1. bill lamJan 16, 2009
  2. Jike SongJan 16, 2009
  3. thestar@fussycoder.id.auJan 16, 2009
  4. Jakub NarebskiJan 16, 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.