News for hackers. Stuff that matters.
Re:Stacked Diffs with git rebase —onto by pimeys on Friday December 05, 2025 @07:18AM (#46160283)
There's a very common alias `jj tug` for this case:

  tug = ["bookmark", "move", "--from", "heads(::@- & bookmarks())", "--to", "@-"]
It moves the nearest bookmark to the commit before the current one (which should be your working commit).
Re:Stacked Diffs with git rebase —onto by stavros on Friday December 05, 2025 @07:47AM (#46160557)
Thanks, I replaced my Frankenstein's monster of a parsing pipeline with this, very useful!
Re:Stacked Diffs with git rebase —onto by mhitza on Friday December 05, 2025 @10:23AM (#46162484)
This looks like any other git arcane incantation. If this is a common pattern and jj aims to make things easier, should probably be part of the core commands, no?
Re:Stacked Diffs with git rebase —onto by steveklabnik on Friday December 05, 2025 @05:37PM (#46168320)
It's something that makes a specific workflow easier, a lot of folks that use jj don't necessarily use that workflow.

That doesn't mean it couldn't be a core command someday, but given that the alias works well for people, there's not a ton of reason to make a whole new command. You configure the alias and you're off to the races.