On Sun, Aug 24, 2025 at 07:31:45PM +0200, Kristoffer Haugsbakk wrote: > On Tue, Aug 19, 2025, at 12:55, Patrick Steinhardt wrote: > > 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. > > > > A copule of these features relate to history editing. Most importantly, > > I really dig the following commands: > > > > - jj-abandon(1) to drop a specific commit from your history. > > > > - jj-absorb(1) to take some changes and automatically apply them to > > commits in your history that last modified the respective hunks. > > > > - jj-split(1) to split a commit into two. > > > > - jj-new(1) to insert a new commit after or before a specific other > > commit. > > > > Not all of these commands can be ported directly into Git. jj-new(1) for > > example doesn't really make a ton of sense for us, I'd claim. But some > > of these commands _do_ make sense. > > > > I thus had a look at implementing some of these commands in Git itself, > > where the result is this patch series. Specifically, the following > > commands are introduced by this patch series: > > > > - `git history drop` to drop a specific commit. This is basically the > > same as jj-abandon(1). > > > > - `git history reorder` to reorder a specific commit before or after > > another commit. This is inspired by jj-new(1). > > > > - `git history split` takes a commit and splits it into two. This is > > basically the same as jj-split(1). > > I think it would be nice if git-history(1) called the `post-rewrite` hook. > In particular for Split; then all the possible rewrite modes are covered > (one-to-one, many-to-one (squash), and one-to-many). That's a sensible thing indeed. I'll add this to my todo list for v3. Patrick