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

Re: How to implement the "amend!" commit ?

From
Taylor Blau <me@ttaylorr.com>
Date
Jan 14, 2021, 17:32 UTC
Message-ID
<YACAHdDEMIgvQruK@nand.local>
In-Reply-To
<99b40665-45dd-6c4d-d46a-56c7dbf89568@gmail.com>
On Thu, Jan 14, 2021 at 10:39:50AM +0000, Phillip Wood wrote:
Show 7 quoted lines
> > Secondly, As an alternative to above, we can use `--fixup=<commit>
> > --amend` and `--fixup=<commit> --reword`.
>
> This is not backwards compatible. At the moment If you create a fixup with
> `git commit --fixup=aaa` and then realize it should refer to commit bbb
> instead you can fix it with `git commit --amend --fixup=bbb`. That would no
> longer be possible.

Too bad. I felt that this was the most ergonomic idea put forwards, but I also thought that we died with '--amend --fixup=xxx'. Its current behavior does make sense to me, but it's too bad that we can't use it for this new purpose.

I suppose the first option (the '--fixup=reword:xxx' one really is the only one that can be implemented while preserving backwards compatibility, so I think we have no choice but to go with that one.)

Thanks, Taylor

Previous: Phillip WoodNext: Phillip Wood
Message 6 of 15 in “How to implement the "amend!" commit ?”
  1. Charvi MendirattaJan 13, 2021
  2. Taylor BlauJan 13, 2021
  3. Taylor BlauJan 13, 2021
  4. Charvi MendirattaJan 14, 2021
  5. Phillip WoodJan 14, 2021
  6. Taylor BlauJan 14, 2021
  7. Phillip WoodJan 15, 2021
  8. Martin ÅgrenJan 15, 2021
  9. Junio C HamanoJan 14, 2021
  10. Phillip WoodJan 15, 2021
  11. Junio C HamanoJan 15, 2021
  12. Charvi MendirattaJan 17, 2021
  13. Junio C HamanoJan 17, 2021
  14. Charvi MendirattaJan 17, 2021
  15. Charvi MendirattaJan 15, 2021

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.