Files
git/Documentation
Patrick Steinhardt 4deb389894 builtin/history: implement "drop" subcommand
A common operation when editing the commit history is to drop a specific
commit from the history entirely, but this operation is not currently
covered by git-history(1).

A couple of noteworthy bits:

  - This is the first git-history(1) command that will ultimately result
    in changes to both the index and the working tree. We thus have to
    add logic to merge resulting changes into those.

  - It is still not possible to replay merge commits, so this limitation
    is inherited for the new "drop" command.

  - For now we refuse to drop root commits. While we _can_ indeed drop
    root commits in the general case, there are edge cases where the
    resulting history would become completely empty. This is thus left
    to a subsequent patch series.

Other than that, most of the logic is rather straight-forward as we can
continue to build on the preexisting logic in git-history(1) for most of
the part.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-11 10:48:53 -07:00
..
2026-05-31 10:00:38 +09:00
2026-05-31 10:00:39 +09:00
2026-04-13 13:54:57 -07:00
2026-03-06 13:02:20 -08:00
2026-05-21 12:06:48 +09:00