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

Editing a typo in the message given to "git commit"

From
Nnorm@dad.org <norm@dad.org>
Date
Aug 21, 2016, 15:19 UTC
Message-ID
<201608211519.u7LFJiMR090069@shell1.rawbw.com>
I am learning how to use git. I would like to know:

How can I correct a typo in the message I gave to an old "git commit"? I see that the typo occurs in exactly two files in .git:

.git/logs/refs/heads/master .git/logs/HEAD

/usr/bin/file says that they are both ASCII English text. So I could just hand edit them. But that seems somehow sacrilegious and might break git.

    Norman Shapiro
Next: Pranit Bauva
Message 1 of 4 in “Editing a typo in the message given to "git commit"”
  1. norm@dad.orgAug 21, 2016
  2. Pranit BauvaAug 21, 2016
  3. Eric WongAug 21, 2016
  4. Jakub NarębskiAug 22, 2016

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.