Navigate to the repo, then select the branch (for example) with the dropdown:
Then after the switch you can choose to Compare
or Pull request
which will display again at the top of the repo file list - in both you can compare, but PR option can open a "ticket" for merging - the request to pull from a branch.
Or you can click on the commits link:
Then simply open the commit (if you check from Compare
or Pull request
and within the diff itself you can hover over specific lines. Once the cursor hovers a +
sign appears. You can comment and the author will get a notification via email.
Note: while reviewing the whole codebase is possible through commits, make sure you know what state you're reviewing because the commit comment won't simply disappear as if in a Pull request. It'll stay there, so you'll need to somehow make a note that it's resolved (unless GitHub added a new feature I'm not aware of) and check again e.g. in master
branch whether the part of the file has been resolved.
It's quite a cumbersome process though, so it'll be okay probably just for smaller sections of the codebase or for school projects as it doesn't scale well due to the comments remaining in place and required manual task of checking whether the review comments have been taken into consideration / implemented.
For scaling you can use perhaps a more intrusive, but more scalable technique such as creating a new empty repo (or a new branch, then while :;do git reset HEAD~ --hard;done
up to initial commit) and adding relevant file(s) grouped by a feature they represent (and hopefully a test, because it'll definitely break the codebase for a while) and then start opening PRs for each, review, let GitHub remove the comments and merge when the code is of a sufficient quality. Still though, it's a workaround when trying to treat git as a simple folder structure, which it is not - rather a graph/tree.
Alternatively you can create a task list for your student/colleague/peer where s/he can mark the tasks as completed or open a completely new issue with relevant lines referenced by a permalink.
main
), I don't see the optionCompare
orPull Request
. There is the "Pull requests" link, but there aren't any PRs. imgur.com/a/yViD7Rw I know how to make comments on commits or PRs, which is how I usually do it, although, as you mention, there are downsides to stepping through the commit graph. – Bender