Skip to content

Creating branches and writing pull requests

erikgodel edited this page Oct 14, 2026 · 11 revisions

Pull Request Creation checklist

Use this checklist when creating a PR.

1. Create a branch

Checklist:

  • The branch was created from the latest main.
  • The branch name follows the naming convention.
  • The branch focuses on one task.

Example : git switch -c feature/user-login

Why?

For each feature, bug fix, refactor, documentation update, or maintenance task.

Naming

  • Use lowercase letters
  • Short and descriptive
  • Use-dashes-between-words

Use these prefixes for change types:

  • feature/<short-description> for new functionality
  • bugfix/<short-description> for bug fixes
  • refactor/<short-description> for restructuring without changing functionality
  • docs/<short-description> for documentation changes
  • chore/<short-description> for CI, configuration, tooling, or maintenance

2. Working on a branch

Checklist:

  • All changes are related to the purpose of the branch.
  • Unrelated changes have been moved to another branch or PR.
  • Commits are small.
  • Regularly sync the branch with main and solve merge conflicts.

Commit message

Keep commits small and focused. Commit subjects should be short and use the imperative mood.

Example: Add shared trip voting

Use a commit body when useful to explain what changed and why, not how the implementation works.

3. Push the branch

Checklist:

  • All required commits have been pushed.
  • The remote branch contains the latest changes.

Use this command: git push -u origin <branch-type>/<branch-name>

4. Create the PR

Follow this format:

Closes #<issue-number>

Briefly describe what this Pull Request does.

## Why

Explain why this change is necessary.

## Changes

Describe the main changes included in the PR.
- Change 1
- Change 2
- Change 3

## Tests

Describe the tests added or updated, and list the checks you ran (including commands such as `./gradlew check`).
If testing is not applicable, explain why.

## Screenshots

Add screenshots, recordings, or other visual evidence when applicable.
N/A if not required.

4. When is a PR ready to merge ?

  • It represents one task or a small coherent set of changes.
  • It has a clear and descriptive title.
  • The PR description explains what changed and why.
  • It contains no unrelated changes.
  • Commits are reasonably sized and understandable.
  • All required tests and CI checks pass.
  • All merge conflicts are resolved.
  • Reviewer feedback has been addressed.
  • At least one teammate has approved the Pull Request.

5. Deleting the branch

Checklist before deleting a branch :

  • The PR was successfully merged.
  • main contains the merged changes

Delete the remote branch with the repo interface or with : git push origin --delete <branch-type>/<branch-name>

Then delete the local branch : git checkout main git pull git branch -d <branch-type>/<branch-name>