git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v8 0/7] Introduce git-history(1) command for easy history editing

From
D. Ben Knoble <ben.knoble@gmail.com>
Date
Jan 7, 2026, 17:39 UTC
Message-ID
<CALnO6CDhDFtz5WY2pd8as5nH-URxzfNUfkouQ2Cf6USuRRTrKw@mail.gmail.com>
In-Reply-To
<20260107-b4-pks-history-builtin-v8-0-18e9779e3a26@pks.im>
On Wed, Jan 7, 2026 at 5:10 AM Patrick Steinhardt <ps@pks.im> wrote:
Show 7 quoted lines
>
> Hi,
>
> over recent months I've been playing around with Jujutsu quite
> frequently. While I still prefer using Git, there's been a couple
> features in it that I really like and that I'd like to have in Git, as
> well.
Show 5 quoted lines
> - I've dropped the patches introducing `git history split` and will
>   send this as a follow-up patch series once this once has been
>   merged. This was done to focus attention on the underlying mechanics
>   as much as possible (and to keep my own sanity with the frequent
>   revamps).

Sane, if sad for my custom build which has enjoyed having "git history" commands available :) I can wait for other patches, or try to contribute some, though.

[reads further]
Oh, it's just split that drops; we still have reword, etc. Cool!
Show 23 quoted lines
> Range-diff versus v7:
>
>  -:  ---------- >  1:  53a845e874 builtin/replay: extract core logic to replay revisions
>  -:  ---------- >  2:  3ff1c0bacf builtin/replay: move core logic into "libgit.a"
>  -:  ---------- >  3:  598df4e186 replay: small set of cleanups
>  -:  ---------- >  4:  fd6a0ec5b8 replay: yield the object ID of the final rewritten commit
>  1:  0e2d8db69f =  5:  04b832320f wt-status: provide function to expose status for trees
>  2:  087c563575 <  -:  ---------- replay: extract logic to pick commits
>  3:  4ab2a6f807 <  -:  ---------- replay: stop using `the_repository`
>  4:  d2138e95d4 !  6:  e223659b86 builtin: add new "history" command
>     @@ Commit message
>
>          While these operations are all doable, it often feels needlessly kludgey
>          to do so by doing an interactive rebase, using the editor to say what
>     -    one wants, and then perform the actions. Furthermore, some operations
>     -    like splitting up a commit into two are way more involved than that and
>     +    one wants, and then perform the actions. Also, some operations like
>     +    splitting up a commit into two are way more involved than that and
>          require a whole series of commands.
>
>     -    Add a new "history" command to plug this gap. This command will have
>     +    Another problem that rebases have is that dependent branches are not
>     +    being updated. The use of stacked branches has grown quite common with

"[D]ependent branches are not being updated" reads weirdly to me. "Rebases also do not update dependent branches" perhaps?

>     +    competiting version control systems like Jujutsu though, so it clearly
"competing" ;)
Show 22 quoted lines
>     +    is a need that users have. While rebases _can_ serve this use case if
>     +    one always works on the latest stacked branch, it is somewhat awkward
>     +    and very easy to get wrong.
>     +
>     +    Add a new "history" command to plug these gaps. This command will have
>          several different subcommands to imperatively rewrite history for common
>     -    use cases like the above. Some of these subcommands will be implemented
>     -    in subsequent commits.
>     +    use cases like the above.
>
>          Signed-off-by: Patrick Steinhardt <ps@pks.im>
>
>     @@ Documentation/git-history.adoc (new)
>      +
>      +NAME
>      +----
>     -+git-history - EXPERIMENTAL: Rewrite history of the current branch
>     ++git-history - EXPERIMENTAL: Rewrite history
>      +
>      +SYNOPSIS
>      +--------
>     @@ Documentation/git-history.adoc (new)
[snip]
>     ++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.
Hm? This feels incomplete to me.

Best, Ben

Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 16 of 18 in “Introduce git-history(1) command for easy history editing”
  1. 0/7 Introduce git-history(1) command for easy history editingPatrick Steinhardt, Jan 7, 2026
  2. 1/7 builtin/replay: extract core logic to replay revisionsPatrick Steinhardt, Jan 7, 2026
  3. D. Ben KnobleJan 7, 2026
  4. Patrick SteinhardtJan 9, 2026
  5. 2/7 builtin/replay: move core logic into "libgit.a"Patrick Steinhardt, Jan 7, 2026
  6. 3/7 replay: small set of cleanupsPatrick Steinhardt, Jan 7, 2026
  7. 4/7 replay: yield the object ID of the final rewritten commitPatrick Steinhardt, Jan 7, 2026
  8. 5/7 wt-status: provide function to expose status for treesPatrick Steinhardt, Jan 7, 2026
  9. 6/7 builtin: add new "history" commandPatrick Steinhardt, Jan 7, 2026
  10. 7/7 builtin/history: implement "reword" subcommandPatrick Steinhardt, Jan 7, 2026
  11. D. Ben KnobleJan 7, 2026
  12. Patrick SteinhardtJan 9, 2026
  13. D. Ben KnobleJan 9, 2026
  14. Elijah NewrenJan 10, 2026
  15. Patrick SteinhardtJan 12, 2026
  16. D. Ben KnobleJan 7, 2026
  17. Patrick SteinhardtJan 9, 2026
  18. D. Ben KnobleJan 9, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.