Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you ever worked with stacked PRs, and the top one gets squashed and merged it often becomes a nightmare to rebase the rest of the PRs to bring them up to date.


I wish this was easier. I have a workflow that I use to create stacked PRs which involves changing the target branch of the next PR to `main` after merging its predecessor, but it is too fragile to institute as a policy.

However, this is also just a more specific version of the general problem that long-lived, elaborate topic branches are difficult to work with.


jj makes this mostly trivial - well worth checking out if you’d like to work this way, but GitHub gets in the way.


    git rebase --onto squashed nonsquashed next-pr
Works fine in my experience (except when submodules are involved)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: