DEV Community

Cover image for Reference Guide: Pull Requests

Posted on • Updated on

Reference Guide: Pull Requests

The next part of my series addresses 'Pull Request'. A Shared Repository Model allows organizations and teams to collaborate by sharing a single repository with branches used to develop features and isolate changes. A 'pull request' provides a way to notify project maintainers about changes made and initiates the code review process.

For anyone new to code collaboration set yourself up for success and use a reference guide to help walk you through the steps like the ones outlined below.

Once items are production ready a pull request needs to be completed to merge the changes into the master branch.

Pull Request to unprotected master branch:
Access the repository in GitHub. Recently pushed changes should appear in a highlighted section on the main page of the repository with a green button compare and pull request on the right-hand side of the highlighted section.

  • Select compare and pull request
  • Select merge pull request

Pull Request to protected master branch:
In a group environment with collaborators working within a repository with a protected master branch do the following:

  • Go into GitHub and select the project repository
  • Locate the highlighted section indicating the most recent pushed changes

protected branch pull request

  • Select compare and pull request
  • Select a Reviewer
    • This will be one of the contributors added to the initial project
  • Select Create pull request
    • This step will create the pull request and indicate a review is required and merging is blocked until a review has been completed.
    • At this point, GitHub will send an email request to the selected reviewer to notify them of a pending review. To speed up the process it’s best to send a direct message to the selected contributor to notify them the request has been made.

If you missed a previous post you can check them out here:

Up next:Conducting a Code Review

For the completed Reference Guide Series:

Top comments (0)