Which do you prefer for GitHub PR diffs: "Unified" or "Split"? I honestly can't decide which I prefer. Hide whitespace seems like an obvious win to keep on by default.
Comments
Log in with your Bluesky account to leave a comment
What if I told you that you didn't have to have an opinion on this and that you're allowed to use the appropriate view type depending on the circumstances.
I switch between the two when the need arises. Unified most of the time, and Split for when there are too many lines in a given diff. At least the option is always there for us when our preferences change, and I kinda wish they were 1 click away instead of 2.
For me it really depends on what the diff is of. Language, how much of the file is changed, what my role in the review is etc. sometimes I don’t even know which will be better until I toggle and be just ~feels~ more logical for the task at hand
I have tried both options several times. But since split is the default in Github (also in VS Code) that's when I end up using 99% of the time. I like that in VS Code you can still toggle line-wrapping on/off, I wish the Github web view could do the same
I like Split because I come at it from a translation/writing background. I'm used to having my source/original on the left and my target/changes/translation on the right so I can compare and contrast and make adjustments
Genuinely, both depending on the scenario. Unified is great for spotting small changes within a mostly-unchanged code block. But git is not nearly smart enough to parse complex structural changes in a useful way, so side-by-side is vital too.
To me "split" feels better on larger screens, while "unified" works best on smaller ones. That said, "unified" is probably more familiar, since that’s how it’s typically displayed in the command line.
Comments
So I’m not sure I could say “preference” since I didn’t know about both and choose one.
https://blog.gitbutler.com/how-git-core-devs-configure-git/
If it’s a bigger/more complicated diff I tend to use split.
Unified is better for smaller changes.