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

Stacked PRs is clearly a nice workflow... except that forges like Github generally have really poor support for them.

I wish Github would just allow you to say "this PR depends on this other PR", and then it wouldn't show commits from the other PR when reviewing the stacked PR.

But as far as I know you can't do that.



If you change the target branch it will only show commits that are against that. I wish GitHub did that automatically because it has the parent commit tree but when do you that you'll only see commits that diverge from the target branch/pr.

Is that what you want?


Not really. I've tried that with Gitlab, but it's kind of awkward. My PR isn't to merge branch B into branch A. For instance if the project owners see the PR for B and say "yeah great! I'll merge this" and press merge, it will just merge it into branch A and then close your PR!

It's a hacky workaround at best. I want proper support. I want Github to disable the merge button until the dependencies are merged. I want it to actually list the dependencies and link to them. I want the target branch to be `main`.

I think if they did those 3 things it would go 90% of the way. Too much to ask though clearly.


That works but depending on how you merge the PR, you end up needing to do a rebase on all of your future PRs.

I really wish 1PR = 1 commit with revision based diffs. Similar to gerrit.


Another person has commented that you can do this, but it's a little known thing. git-spice automatically manages it for you too.


It also doesn't work from forks.


This has annoyed me a few times, just recently a week ago. Thanks GitHub.




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

Search: