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

I can only speak from using GitHub (which I'm not overall very happy with anyway), but PRs on my team can recommend review either "by file" or "by commit", with a very strong preference for the latter.

"By file" means that the reviewer should look at the diff between the branch base and tip, ignoring the intermediate changes along the way. If the individual commits really don't matter, "by file" suggests that we ought to squash this branch into a single commit; and if they do matter, something prevented us from providing a proper, clean narrative. "By file" is a smell.

"By commit" is what the article assumes. Rather than look at the sum total of changes, you look at what each commit individually changed.

In GitHub, "by file" corresponds to reviewing by the "Files changed" tab, while "by commit" corresponds to reviewing by the "Commits" tab (and going through each commit in order).

At the command-line, "by file" corresponds to `git diff develop..feature`, and "by commit" corresponds to `git show --reverse develop..feature` (which shows all selected commits in order from least to most recent).

> Given that I don't control the tools used, how do I ensure that functional changes aren't lost amidst formatting changes?

Given the above, you can and should isolate those kinds of changes into separate commits, so that the functional changes are the only visible changes in their respective commits.



Sadly, it doesn't appear BitBbucket has similar options, but good notes anyway, thank you!


BitBucket's documentation shows similar tabs -- is this not what you see?

https://confluence.atlassian.com/bitbucketserver/review-and-...

The section on "View a single commit within a pull request" shows something very similar to GitHub's "Commits" tab.


Oh! I see now. I misunderstood what you were describing.

Yes, okay, I do sometime click through and look at each commit, I just never thought about default to that, or recommending it

Extra thanks!




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: