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

Commiting unchanged tree

From
MMaaartin <grajcar1@seznam.cz>
Date
Sep 18, 2010, 08:15 UTC
Message-ID
<loom.20100918T095640-130@post.gmane.org>
I thought that calling
git commit --amend -m "A message"

twice in a row should lead to an error saying "nothing to commit (working directory clean)", but it doesn't. Or at least, the result of the second commit should be the same as the result of the first one, but I keep getting a different hash each time

# git commit --amend -m "A message" [master b8cf1c2] A message # git commit --amend -m "A message" [master 6c8ea30] A message # git commit --amend -m "A message" [master be318b3] A message

I wonder if everything is fine with my repo since I was doing some funny rebasing and filtering and I'm quite new to git.

Next: Ævar Arnfjörð Bjarmason
Message 1 of 2 in “Commiting unchanged tree”
  1. MaaartinSep 18, 2010
  2. Ævar Arnfjörð BjarmasonSep 18, 2010

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.