Pull request template examples, and where the file goes
A pull request template fills in the description box every time someone opens a pull request, so reviewers always get the same answers: what changed, why, and how it was tested. Copy one of the four below, then save it where your Git host looks for it. File locations are from each platform’s own documentation, checked December 4, 2026.
What a good pull request description answers
- What changed, in a sentence or two.
- Why: the problem it solves, or a link to the issue.
- How it was tested, so the reviewer can repeat it.
- Anything risky: database migrations, config changes, work left for later.
- Screenshots, for anything people will see.
Keep the template short. A long checklist gets ticked without being read. In the templates below, the hints sit inside <!-- --> comments: on GitHub and GitLab they show while you’re writing and stay hidden once the description is posted, so nobody has to delete them.
1. General template
A good default for most repositories.
## What changed <!-- One or two sentences. --> ## Why <!-- The problem this solves. Link the issue, for example: Closes #123 --> ## How I tested it <!-- Steps a reviewer can repeat, or the tests you added. --> ## Screenshots <!-- Before and after, for anything people will see. Delete if not needed. --> ## Notes for the reviewer <!-- Anything risky, unfinished or worth a close look. --> ## Checklist - [ ] Tests added or updated - [ ] Docs or README updated if behavior changed - [ ] No secrets, keys or personal data in the diff
2. Bug fix template
Asks for the cause as well as the fix, which is the part reviewers most often have to ask about.
## The bug <!-- What was broken and how it showed up. Closes #123 --> ## The cause <!-- The root cause, in plain words. --> ## The fix <!-- What this change does about it. --> ## How I tested it - [ ] Reproduced the bug before the fix - [ ] Confirmed it's gone after the fix - [ ] Added a test that fails without the fix ## Risk <!-- What else could this change affect? -->
3. Feature template
For bigger changes, with a rollout section for flags, migrations and docs.
## What this adds <!-- The feature in one or two sentences. Closes #123 --> ## Why <!-- Who asked for it, or what it makes possible. --> ## How it works <!-- The main parts of the change, so reviewers know where to start. --> ## How I tested it <!-- Tests added, and anything you checked by hand. --> ## Screenshots or demo <!-- Delete if nothing visible changed. --> ## Rollout - [ ] Behind a feature flag, or safe to ship as is - [ ] Database migration: none, or included and reversible - [ ] Docs updated ## Follow-ups <!-- Work left for later, with links to the issues. -->
4. Small change template
For typo fixes, dependency bumps and one-line changes, where a full template is overkill.
## What and why <!-- One line is enough. --> ## Tested by <!-- CI only / ran it locally / not needed, because... -->
Where to put the file
GitHub
Name the file pull_request_template.md and save it in the repository’s root folder, in docs/, or in the hidden .github/ folder. It only shows up once it’s on the default branch, and the file name isn’t case-sensitive.
For more than one template, put them in a PULL_REQUEST_TEMPLATE folder, for example .github/PULL_REQUEST_TEMPLATE/bug_fix.md, then choose one by adding template=bug_fix.md to the compare link:
https://github.com/OWNER/REPO/compare/main...my-branch?quick_pull=1&template=bug_fix.md
You can also set default templates for every repository in an organization or personal account.
GitLab
GitLab calls them merge request templates. Save each one as a .md file in .gitlab/merge_request_templates/ on the default branch, and people pick it from the Choose a template list when they create a merge request. Name one Default.md and it fills in every new merge request on its own. Premium and Ultimate projects can set a default in Settings, Merge requests instead, and that one wins over Default.md.
The default template can also use variables such as %{all_commits} and %{first_commit}, which GitLab swaps for commit messages when the merge request is first saved.
Bitbucket Cloud
Commit the template as .bitbucket/pull_request_template.md. Bitbucket reads it from the source branch, the one you’re merging from, so different branches can carry different templates. If the file isn’t there, the pull request gets the repository’s default description instead.
Azure DevOps
Name the default template pull_request_template.md (or .txt) and save it on the default branch in .azuredevops/, .vsts/, docs/ or the root folder. Azure Repos checks those folders in that order and uses the first template it finds.
For pull requests into one branch only, save a template named after the branch in a pull_request_template/branches/ folder, such as .azuredevops/pull_request_template/branches/dev.md for pull requests into dev. Microsoft points out that templates are advisory: to require reviewers or a passing build, use branch policies.
Link the issue so it closes itself
On GitHub and GitLab, writing Closes #123 in the description links that issue and closes it when the change merges into the default branch. It’s why the templates above ask for the issue link right under “Why”.
Check the description before merging
A template only helps if people fill it in. CodeRabbit (affiliate link), an AI code reviewer, has pre-merge checks that look at a pull request’s title and description, and whether the change matches its linked issue, before it merges. It also posts its own plain-language walkthrough of the changes, which helps when the author’s description is thin.
Clear commit messages make the description easier to write, too. My free Git commit message builder formats one for you, and my code review checklist covers what the reviewer should look at once the description is in.
Frequently asked questions
Where do I put a pull request template on GitHub?
Save it as pull_request_template.md in the repository root, in docs/, or in .github/, on the default branch. It then fills in the description of every new pull request.
Can I have more than one pull request template?
Yes. On GitHub, put them in a PULL_REQUEST_TEMPLATE folder and add template=name.md to the compare link. GitLab lists every file in .gitlab/merge_request_templates/ in its Choose a template menu, and Azure DevOps lets authors add extra templates from a menu.
Why isn’t my pull request template showing up?
Usually because it isn’t on the default branch yet, or the folder or file name is wrong. On Bitbucket Cloud the template is read from the source branch, so that branch needs the file.
Is a merge request template the same as a pull request template?
Yes. GitLab calls pull requests merge requests, so its templates go in .gitlab/merge_request_templates/, but they do the same job.