Code Review Pull Request on Github

Hanz
2 min readMay 3, 2020

--

In software development, The primary purpose of code review is to make sure that the overall code health of the code base is improving over time.

As an Author (Summit Code to Reviewers)

Typically, each one has to create a branch for his/her own development. and commit new features to their branches.

Check branches

show all branches of this repo,* indicate which is your current branch.

$ git branch
* master

Open a new branch

create a new branch named “develop/test"

$ git branch develop/test$ git branch
* master
develop/test

And if you want to rename or delete your branch, use -m / -d in your command:

$ git branch -m develop/test test2
$ git branch -d test2
$ git branch
* master
test2

Switch to a specific branch

$ git checkout develop/test 

Create a pull request

First, commit code to your branch.

$ git add .
$ git commit -m "update"
$ git push origin develop/test

Open your Github repository page on the browser, click Compare & pull request

Assign one or more Reviewers, fill comments and click Create pull request

Congrats, you have sent a pull request to your colleagues!

As a Reviewer (Make the code healthier)

If you are a reviewer, open pull request tab in the repo, you will find some pull requests, and you can review the code and leave comments by clicking Review changes.

After the review of this commit is completed, it’s ready to merge the pull request to master or your main release branch.

--

--

No responses yet