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

Re: using oldest date when squashing commits

From
Johannes Sixt <j6t@kdbg.org>
Date
Oct 24, 2023, 21:19 UTC
Message-ID
<59731c05-c3f6-4815-8411-783bb1c2aac4@kdbg.org>
In-Reply-To
<xmqqpm143p46.fsf@gitster.g>
Am 24.10.23 um 19:30 schrieb Junio C Hamano:
Show 6 quoted lines
> Phillip Wood <phillip.wood123@gmail.com> writes:
>> "fixup -c/-C" were conceived as a way to reword a commit message at
>> the same time as optionally fixing up the commit's content.
> 
> Yup, it still is a "fix", meaning the identity and the spirit of the
> commit being fixed are unchanged.

That's a pitty, because that is not at all what *I* use "fixup -C" for. To update the commit message, I use "squash" (or occasionally "reword"). I use "fixup -C" after the following events:

1. Commit unfinished changes for whatever reason. Usually the commit
message just says "WIP <topic>" because that's what it is.
2. Make a fixup commit for an earlier commit because doing the fixup now
gets it out of the way, and often delaying it until after the completed
change would cause merge conflicts.
3. Complete the WIP including the commit message.

I would now use "fixup -C" on commit 3, because its metadata reflects reality more accurately than that of 1. Commit 3 often comes days after 1.

-- Hannes
Previous: Oswald BuddenhagenNext: Marc Branchaud
Message 9 of 15 in “using oldest date when squashing commits”
  1. Oswald BuddenhagenMar 19, 2022
  2. Johannes SixtMar 20, 2022
  3. Oswald BuddenhagenMar 20, 2022
  4. Phillip WoodOct 24, 2023
  5. Oswald BuddenhagenOct 24, 2023
  6. Phillip WoodOct 24, 2023
  7. Junio C HamanoOct 24, 2023
  8. Oswald BuddenhagenOct 24, 2023
  9. Johannes SixtOct 24, 2023
  10. Marc BranchaudOct 27, 2023
  11. Oswald BuddenhagenOct 27, 2023
  12. Marc BranchaudOct 27, 2023
  13. Oswald BuddenhagenOct 27, 2023
  14. Marc BranchaudOct 27, 2023
  15. Junio C HamanoOct 27, 2023

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.