summaryrefslogtreecommitdiff
path: root/git-commit-script
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-04-27 07:53:53 +0200
committerJunio C Hamano <gitster@pobox.com>2026-04-27 22:20:57 +0900
commitc6c225793003ffb8b376c8994d44ca63bc04ac40 (patch)
tree32172d8b67e4ad7b407fe1daac09a97b88c19c5d /git-commit-script
parent88191ea02330627a85664909026fb6953e0d8af8 (diff)
builtin/history: introduce "fixup" subcommand
The newly introduced git-history(1) command provides functionality to easily edit commit history while also rebasing dependent branches. The functionality exposed by this command is still somewhat limited though. One common use case when editing commit history that is not yet covered is fixing up a specific commit. Introduce a new subcommand that allows the user to do exactly that by performing a three-way merge into the target's commit tree, using HEAD's tree as the merge base. The flow is thus essentially: $ echo changes >file $ git add file $ git history fixup HEAD~ Like with the other commands, this will automatically rebase dependent branches, as well. Unlike the other commands though: - The command does not work in a bare repository as it interacts with the index. - The command may run into merge conflicts. If so, the command will simply abort. Especially the second item limits the usefulness of this command a bit. But there are plans to introduce first-class conflicts into Git, which will help use cases like this one. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-commit-script')
0 files changed, 0 insertions, 0 deletions