News for hackers. Stuff that matters.
Re:Jujutsu for Busy Devs by amomchilov on Tuesday July 22, 2025 @08:41AM (#44646164)
Stacked diffs are a core part of my workflow, letting me “work ahead” without being blocked waiting for reviews.

Setting them up in git is not to bad. Adding a change to the bottom of the stack, and restacking everything on top… that’s hell in git.

Re:Jujutsu for Busy Devs by Cthulhu_ on Tuesday July 22, 2025 @09:46AM (#44646838)
Check out the rebase.updateRefs option: https://dev.to/onepoint/git-update-refs-in-a-nutshell-574c
Re:Jujutsu for Busy Devs by Too on Tuesday July 22, 2025 @09:31AM (#44646666)
git rebase -i lets you reorder commits easily, as long as they don’t have conflicts. If they do, you’re in for a rough time. I struggle to see how a vcs could help with that, even if I’d be happy to be proven wrong.

One cool tip to help with conflicts is the revert trick. If you have a conflict that you need resolved earlier in your commit chain, you can commit a cleanup that hides the conflict, revert it instantly and reorder the commits with interactive rebase to insert the revert first. It’s a bit hard to explain without an example, once you’ve tried it you will understand.

Re:Jujutsu for Busy Devs by baq on Tuesday July 22, 2025 @10:21AM (#44647248)
> as long as they don’t have conflicts. If they do, you’re in for a rough time. I struggle to see how a vcs could help with that, even if I’d be happy to be proven wrong.

A vcs can allow you to commit conflicts and then commit their resolutions whenever necessary. This has been pioneered by darcs (IIRC) and jj also allows that.

Re:Jujutsu for Busy Devs by raylu on Friday July 25, 2025 @05:36PM (#44688782)
`git rebase -i` lets you reorder one branch of commits easily

in a stacked PR workflow, after the bottom PR merges, you now want to rebase the whole stack atop the main branch. if that's 3 PRs, that's 3 branches, 3 rebases

one thing `git rebase` doesn't let you do but `jj rebase -s source -d dest` does is move a commit from one branch to another (`git switch dest`, `git cherry-pick source`, `git switch -C source source^`, `git switch dest`)

Re:Jujutsu for Busy Devs by theappsecguy on Tuesday July 22, 2025 @10:13AM (#44647146)
Try git-spice!