Post

Stacked PRs, now on GitHub. Go forth and stack 🥞

14 reposts190 likes

I know that is not completely the same, but I wish devs would just start by dividing their PRs into proper commits. GitHub has stellar UI for reviewing commit-by-commit, but I see most devs just go straight to the files tab when reviewing.

"stellar UI" seems like an overstatement. A bunch of features for review only work in the files tab, but not when you are looking at specific commits. For example: marking files as reviewed and adding suggestions with a button, rather than typing ```suggestion.

Also reviewing by-commit makes you experience more page loads which is quite annoying (especially since it feels like something in the github code that tries to make them faster makes them slower instead, I often end up reloading the page immediately after clicking on a link to make it faster...)

If I could, I would disable the files tab on my PRs until after all commits had been seen individually. Or probably something less intrusive, but still annoying enough to make the commit-by-commit reviews the default.

you assume people still review code (they do not) but good news, stacked PRs lets you stack even more changes and pretend anyone still reviews them 🤪👍

That makes no sense. Different commits can (and should) have changes that undo or change old commits from issues that come up due to testing, scope changes, code review, etc. You can squash later (I like to) to keep main’s commit history at better granularity, but forcing everyone to stare at your

Not sure about stellar, I appreciate that GitHub shows me what changed since I last reviewed. Sometimes 😅 And then I don’t know how to get that view back. But the per-commit wouldn’t be good because most people are no good at separating their commits, which breaks my heart… I love a good history.

I never review commit-by-commit. In my experience, most people end up having a messy git history within a branch, like those “try”… “try again” “ugh” commits that we all know. I often recommend using the squash-and-merge feature on repos, which means *the whole PR* is one commit on main.

My experience is that learning to divide up your PRs into proper commits not only make the PRs much easier to review, but it’s also a great tool for upping your coding skills. And recently I have also seen Claude use these atomic commits to better understand the code. Pretty cool.

What the hell is that website, it keeps opening the video over and over, even when I turn on reader mode.. I felt like I was escaping a malware rather than learning of an interesting sounding new feature.

finally. the real test is whether dependent PRs stay painless once rebases and merge queues enter the picture