GitHub Code Review

Code Review

Write better code

On GitHub, lightweight code review tools are built into every pull request. Your team can create review processes that improve the quality of your code and fit neatly into your workflow.

Screenshot of the 'Open a pull request' interface on GitHub, showing a comparison between the 'master' and 'blue-a11y' branches. The pull request title is 'Color refresh,' with an area for adding comments and a button to 'Create pull request. The background has a pink-to-purple gradient.

See every update and act on it, in-situ

Diffs

Preview changes in context with your code to see what is being proposed. Side-by-side Diffs highlight added, edited, and deleted code right next to the original file, so you can easily spot changes.

Learn more

Screenshot showing a code diff in a file named head.scss. The removed lines are min-height: 40px; and padding: 10px;. The added lines are position: sticky;, top: 0;, and padding: 20px. The background has a pink-to-purple gradient.

History

Browse commits, comments, and references related to your pull request in a timeline-style interface. Your pull request will also highlight what’s changed since you last checked.

Learn more

Screenshot of two commits added, and the changes were approved. The background has a pink-to-purple gradient.

Blame

See what a file looked like before a particular change. With blame view, you can see how any portion of your file has evolved over time without viewing the file’s full history.

Learn more

Image showing a file history showing four version entries with names and timestamps: 'First draft' and 'delete old pricing,' modified over the past few months.

Discuss code
within your code

Comments

On GitHub, conversations happen alongside your code. Leave detailed comments on code syntax and ask questions about structure inline.

Image showing a file history showing four version entries with names and timestamps: 'First draft' and 'delete old pricing,' modified over the past few months. The background has a pink-to-purple gradient.

Review requests

If you’re on the other side of the code, requesting peer reviews is easy. Add users to your pull request, and they’ll receive a notification letting them know you need their feedback.

Dropdown menu showing a request for a review with options to select users. The background has a pink-to-purple gradient.

Reviews

Save your teammates a few notifications. Bundle your comments into one cohesive review, then specify whether comments are required changes or just suggestions.

Notification indicating that a review is required before changes can be made, with a user requested for the review. The background has a pink-to-purple gradient.

Resolve simple conflicts

You can’t always avoid conflict. Merge pull requests faster by resolving simple merge conflicts on GitHub—no command line necessary.

Learn how to resolve merge conflicts

Alert indicating a branch conflict with files that need to be resolved before merging. The background has a pink-to-purple gradient.

Merge the highest quality code

Reviews can improve your code, but mistakes happen. Limit human error and ensure only high quality code gets merged with detailed permissions and status checks.

Fast, relevant results

Give collaborators as much access as they need through your repository settings. You can extend access to a few teams and select which ones can read or write to your files. The options you have for permissions depend on your plan.

Protected branches

Protected Branches help you maintain the integrity of your code. Limit who can push to a branch, and disable force pushes to specific branches. Then scale your policies with the Protected Branches API.

Required status checks

Create required status checks to add an extra layer of error prevention on branches. Use the Status API to enforce checks and disable the merge button until they pass. To err is human; to automate, divine!