Reference Guide: Pull Requests
Tags: codenewbie, beginners, webdev, productivity
Published: 2018-12-22 03:25:15

---
cover_image: https://www.1clickdissertation.co.uk/blog/wp-content/uploads/2016/09/STEMI-guide.jpg
title: Reference Guide: Pull Requests
published: true
description: A reference guide series for new web developers. 
tags: #codenewbie #beginners #webdev #productivity
---
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. 

**CREATE A PULL REQUEST TO MASTER BRANCH**
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](https://thepracticaldev.s3.amazonaws.com/i/cglz3c1yuii51i07mlic.jpeg)

- 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: 

- [Part One:](https://dev.to/kymiddleton/reference-guide-common-commands-for-terminal-6no) Reference Guide: Common Commands for Terminal. 
- [Part two:](https://dev.to/kymiddleton/reference-guide-create-a-github-repository-30f8) Create a GitHub Repository
- [Part three:](https://dev.to/kymiddleton/reference-guide-committing-changes-43el) Committing Changes
- [Part four:](https://dev.to/kymiddleton/reference-guide-committing-changes-with-branches-2f8d) Committing Changes with Branches

Up next:[Conducting a Code Review](https://dev.to/kymiddleton/reference-guide-conducting-a-code-review-k6m)

For the completed Reference Guide Series: 
- [Part One:](https://dev.to/kymiddleton/reference-guide-common-commands-for-terminal-6no) Reference Guide: Common Commands for Terminal. 
- [Part two:](https://dev.to/kymiddleton/reference-guide-create-a-github-repository-30f8) Create a GitHub Repository
- [Part three:](https://dev.to/kymiddleton/reference-guide-committing-changes-43el) Committing Changes
- [Part four:](https://dev.to/kymiddleton/reference-guide-committing-changes-with-branches-2f8d) Committing Changes with Branches
-[Part five:]( https://dev.to/kymiddleton/reference-guide-merge-conflicts-6op) Merge Conflicts
- [Part six:](https://dev.to/kymiddleton/reference-guide-pull-requests-5an9) Pull Requests
- [Part seven:](https://dev.to/kymiddleton/reference-guide-conducting-a-code-review-k6m) Conducting a Code Review
-[Part eight:]( https://dev.to/kymiddleton/reference-guide-complete-and-merge-a-pull-request--12n4) Complete and Merge a Pull Request