Jeff
Jeff

Reputation: 1879

How to request a code review on a committed master branch within GitHub?

I have read postings and performed code reviews on pull requests, for example: "How to create and review a GitHub pull request"

GitHub Question: You (as a solo contributor) have been working on a body of code you have been committing to GitHub for a while. Then later within GitHub, you wish others to code review the commit master branch and wish for them to add add their suggestions.

Basically on GitHub, inviting others on GitHub to perform on full code review on the committed code in the master branch, and allowing their change suggestions to be added. The same code reviewing experience if requesting a code review on a pull request.

Is this possible in GitHub?

Thank you

Upvotes: 15

Views: 7605

Answers (1)

Lolo
Lolo

Reputation: 4159

The steps from the post worked perfectly for me.

Here is a summary of the steps to follow, including a correction on one of the git commands.

Starting from the master branch with all changes committed.

git checkout --orphan full_review
git rm -r --cached *
git clean -fxd
git commit --allow-empty -m "Empty commit"
git branch empty
git merge master --allow-unrelated-histories
git push origin full_review
git push origin empty

After these steps, your repo contains an empty branch and a full_review branch, which you can use to create a pull request:

Pull request

Upvotes: 10

Related Questions