Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add review comments on code in master branch

Tags:

github

There is a repository on github, I have to review that. But all the code is there in the master branch. So I am unable to create any pull request for it as there is only one branch master and so not able to put any review comments on the code. Is there a way I can put review comments without opening a pull requests?
Or some alternative way to open a Pull request in this case?

I tried creating a pull request, but since there is only one branch its not possible. When I open a file directly on the github repository, I dont see any option to put comments.
An alternative I could think of is to create an empty branch and then create a PR. But could there be a better way?

like image 215
nick Avatar asked Feb 01 '26 06:02

nick


1 Answers

  1. So, you are on a master branch on GitHub.com
  2. Open the file you want to review
  3. Find the line where you want to leave a comment
  4. Press "Blame"
  5. Find out which commit has created/updated this line last time. Open this commit
  6. When you opened the target commit from "blame", you are able to leave comments and mention author with @
like image 69
Kirill Avatar answered Feb 03 '26 19:02

Kirill



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!