Skip to main content
  1. Learn
  2. Software Development
  3. Guides
  4. Git tutorial
  5. How to use Git
  6. How to use pull requests in Git
  7. Review & merge a pull request
GuidesSoftware DevelopmentBacklog
Git

Project and code management together.

Review & merge a pull request

Reviewing and merging a pull request in Git is a crucial step in ensuring code quality, facilitating collaboration, and integrating changes into the main branch of a project. With pull request reviews, team members can thoroughly inspect proposed changes, provide feedback, address concerns, and ultimately merge the changes into the codebase.

In this part of our tutorial, we will explore the process of reviewing and merging a pull request in Git.

You can check and review code differences right in Backlog.

First, go to the “Files” tab.

Go to the “Files” tab

If you find something that needs to be modified, you can comment right on the source code.

Just hover over the target row and click the plus button that appears.

Hover over the target row and click the plus button that appears

Enter any changes and the users you want to inform about them. Then click “Submit.”

click “Submit”

Your comments are embedded inline in the source code and also posted to the “Comment” tab.

Also posted to the “Comment” tab

After reviewing the comments on the pull request we added earlier and modify the source code accordingly.

var sortNumber = function (number) {
    number.sort(function (a, b) {
        if (a === b) {
            return 0;
        }
        return a < b ? -1 : 1;
    });
  };

  var number = [19, 3, 81, 1, 24, 21];
  sortNumber(number);
  console.log(number);

Now that the correction is complete, commit and push again.

$ git add sort.js
$ git commit -m "<commit_message>"
$ git push origin add-sort-func
“Fix to use the strict equality operator (===)”

Comment on the pull request we created earlier indicating that it’s fixed.

Subscribe to our newsletter

Learn with Nulab to bring your best ideas to life