From: Patrick Steinhardt Date: Tue, 02 Dec 2025 18:48:06 GMT Subject: Re: [PATCH v6 04/11] builtin: add new "history" command Message-ID: In-Reply-To: On Mon, Nov 17, 2025 at 04:28:06PM +0000, Phillip Wood wrote: > Hi Patrick > > On 27/10/2025 11:33, Patrick Steinhardt wrote: > > When rewriting history via git-rebase(1) there are a couple of very > > There's more than a couple of items in this list, s/couple of/few/? > > > common use cases: > > > > - The ordering of two commits should be reversed. > > > > - A commit should be split up into two commits. > > > > - A commit should be dropped from the history completely. > > > > - Multiple commits should be squashed into one. > > I'd add editing an existing commit to this list, even if we don't implement > it initially Fair indeed. > > diff --git a/Documentation/git-history.adoc b/Documentation/git-history.adoc > > new file mode 100644 > > index 00000000000..6bdfeb50e8b > > --- /dev/null > > +++ b/Documentation/git-history.adoc > > @@ -0,0 +1,44 @@ > > +git-history(1) > > +============== > > + > > +NAME > > +---- > > +git-history - EXPERIMENTAL: Rewrite history of the current branch > > + > > +SYNOPSIS > > +-------- > > +[synopsis] > > +git history [] > > + > > +DESCRIPTION > > +----------- > > + > > +Rewrite history by rearranging or modifying specific commits in the > > +history. > > + > > +THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE. > > Excellent - keeping our options open is a very good idea > > > +This command is similar to linkgit:git-rebase[1] and uses the same > > +underlying machinery. > > This isn't strictly true now that we're baisg "git history" on the replay > machinery. True, this is a historic leftover. > > You should use rebases if you want to reapply a range of > > +commits onto a different base, or interactive rebases if you want to edit a > > +range of commits. > > + > > +Note that this command does not (yet) work with histories that contain > > +merges. You should use linkgit:git-rebase[1] with the `--rebase-merges` > > +flag instead. > > + > > +COMMANDS > > +-------- > > + > > +Several commands are available to rewrite history in different ways: > > + > > +CONFIGURATION > > +------------- > > + > > +include::includes/cmd-config-section-all.adoc[] > > + > > +include::config/sequencer.adoc[] > > This probably isn't relevant now we're not using the sequencer. And this, too. Patrick