[PATCH 0/2] builtin/history: introduce "fixup" subcommand
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Apr 22, 2026, 10:28 UTC
- Message-ID
- <20260422-b4-pks-history-fixup-v1-0-48d4484243de@pks.im>
Hi,
this short patch series introduces a new "fixup" subcommand. This command is the first one that I felt is missing in my day to day work, as I end up doing fixup commits quite often.
The flow is rather simple: the user stages some changes, and then they execute `git history fixup <commit>` to amend those changes to the given commit. As with the other subcommands, dependent branches will then be rebased automatically.
This is the first command that may result in merge conflicts. For now we simply abort in such cases, but there are plans to introduce first-class conflicts into Git. So once we have them, we'll also be able to handle such cases more gracefully. I still think that the command is useful even without that conflict handling.
Thanks!
Patrick
---
Patrick Steinhardt (2):
builtin/history: generalize function to commit trees
builtin/history: introduce "fixup" subcommandDocumentation/git-history.adoc | 52 ++++- builtin/history.c | 198 ++++++++++++++-- t/meson.build | 1 + t/t3453-history-fixup.sh | 500 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 730 insertions(+), 21 deletions(-)
--- base-commit: 94f057755b7941b321fd11fec1b2e3ca5313a4e0 change-id: 20260422-b4-pks-history-fixup-be27e0c4a03e