How to create a Github Pull Request Template


This how to guide on creating a GitHub Pull Request Templates provides a downloadable template and steps to customizing them within a code repo. You can also learn more about the benefits of adopting templates into your workflow by reading our extensive pull request guide.

Step 1. Head over to your GitHub Repo

Go to github and select the repository in which you would like to add your template into..

Step 2. Selecting your Template creation method

Once you reach the home directory of your repo. Navigate to Add File > Upload Files OR Create New. Use the Create New option only if you wish to customize the template content.

Use the upload file option if you want to use our downloadable template for ease of use OR if you lack the permissions to upload a file into the repository.

GitHub pull request template upload in markdown

Follow Step 3a for uploading a GitHub Pull Request Template: 

Step 3a. Uploading your GitHub Pull Request Template

Download our pull request template file and then drag and drop it into the drop zone within github. When your file uploads, it will show a confirmation on screen.

When the uploaded file is visible on screen. Add a quick commit message that mentions “Uploaded Github Pull Request Template” and then click on commit changes.

Pull request Template Upload in GitHub

Step 3b. Publishing your uploaded template

You have successfully published your template! It is now ready to use. It will auto populate every time you create a new pull request. Engineers and code reviewers can now easily fill up details when new changes need to be merged.

For users who do not have upload or repo edit permissions on GitHub. Please follow the steps below.

Step 3. Creating your GitHub Pull Request Template from the file editor

First in the home directory, click on create file. This will bring up a screen with the option to create a new file, like in the illustration shown below.

Within the name field, give your file the following name “pull_request_template.md” . Please note that giving the file a name other than the one stated above will result in the template not automatically showing up every time a pull request is made.

Step 4. Customizing and publishing your PR Template

Download our pull request template file for github and open it in any text editor of your choice. Now copy and paste the contents of the file into the GitHub text editor and commit your changes with a easy to read commit message. 

You may also write you own template in markdown or edit the contents of the one we provided, so it feels more personalized to your fit your workflow.

Paste a pull request template in markdown

Step 5: Committing your Template to the code base

Head to the bottom of the page and then click on the Commit new file to push your changes to the main branch.

Step 6: Testing your template

Navigate to the pull request tab on the repo navigation bar. Now create a PR between any two branches that are mergeable.

If you followed the steps in this guide, the template should show up every time a PR is created.  

How to Preview a Pull Request Template in GitHub

You can find the github pull request template our engineering team created right underneath. Its aimed to getting you to move faster with your code reviews and create a more adoptable structure for designers and product managers to understand what your code does, every time around.