My students currently submit their code in Bitbucket and create a pull request. Bitbucket has a code review tool that allows me to create comments tied to specific lines in the code. I really like this. However, it only lets me comment on the diff, so I can only comment on code in the most recent commit. I want to be able to comment on the entire source file. Is there a tool that lets me do that in a similar fashion?

  • $\begingroup$ At least on github, you can add comments to any line of a file (in a commit, and probably a PR if you « expand the diff » to see more) $\endgroup$ Jan 17, 2020 at 21:08
  • 2
    $\begingroup$ As you seem to be, successfully, using git. It would be nice if you can provide some help with this question cseducators.stackexchange.com/q/2897/204 $\endgroup$ Jan 17, 2020 at 22:58
  • $\begingroup$ Why can't you just do a merge or pull request with the comments in the code itself. Then as the students develop the code they can remove the comments. Also maybe the students should take your comments, convert them in to TODO comments and then use that as a guide. $\endgroup$
    – Guy Coder
    Jan 18, 2020 at 15:36

1 Answer 1


The diff is between the most recent commit and the start of the branch. It's not just the diff of the last commit, it's every commit (stacked on top of each other) since the branch's origins.

If that weren't the case, it'd be nigh impossible to provide meaningful feedback to a code review for a branch's pull request.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.