Re: [PATCH 0/2] commit: preserve commit hash on a no-op amend
Show 11 quoted lines
> Le 13 juin 2026 à 05:59, Johannes Sixt <j6t@kdbg.org> a écrit :
>
> Am 13.06.26 um 11:16 schrieb Harald Nordgren via GitGitGadget:
>> git commit --amend --no-edit rewrote the commit and moved the branch tip
>> even when nothing changed, because the committer date was reset to "now".
>> Reuse the existing committer date so a no-op amend keeps the commit hash and
>> leaves the branch untouched.
>
> `git commit --amend --no-edit` is a way to set the committer timestamp
> to the current time without changing other aspects of the commit. This
> takes away this ability, doesn't it?
Indeed. This is a convenient formula to force CI re-runs in certain environments, and so on.