Learning navigation

Code with Animation

Pull Requests

A dedicated workspace for teams to review, discuss, and refine code before merging.

Version Control6 min readConcept 25 of 29

The Code Gateway

A Pull Request (or Merge Request on GitLab) is a formal proposal to merge code changes from a working branch into another branch (typically main).

It provides a dedicated workspace for a team to review diffs, discuss implementations, and refine the proposed code before it is officially integrated into the project.

Why it matters

Code Review: It allows peers to spot bugs, enforce coding standards, and share knowledge before code is shipped.

CI/CD Checks: PRs act as triggers for automated tests to ensure new changes don't break existing functionality.

Protecting Main: It serves as a strict gatekeeper for the main branch, ensuring only stable, reviewed, and approved code gets deployed.

How it works

1. Open: After pushing a feature branch, a developer opens a PR targeting the base branch.

2. Review: Reviewers examine the exact additions and deletions (diffs), leave comments, request changes, or approve the PR.

3. Merge: Once approved and all automated CI checks pass, the PR is merged into the base branch, and the feature branch is typically deleted.

Follow a pull request

Open a simulated request, review the change and merge it into the target branch.

Source: feature (F1)
Target: main (M1)

+ Add accessible search label
Change is prepared on feature.
1

Draft change

Current step

2

Open for review

Not reached

3

Approved

Not reached

4

Merged

Not reached

A pull request proposes an integration; approval alone does not merge it. This local hosting-platform simulation uses a merge commit and omits repository-specific checks and policies.

Check yourself

Pick an answer to lock it in, then read why. Getting one wrong is part of how it sticks.

  1. 1What is the primary purpose of a Pull Request?
  2. 2Why is it highly recommended to keep Pull Requests small?
  3. 3What happens when you finally merge an approved Pull Request?

Remember this

  • A PR is a proposal to merge code.
  • It is the primary space for code review and CI checks.
  • Keep PRs small to ensure high-quality reviews.
  • Write excellent descriptions to help your reviewers.

Done with this concept?

Mark it complete to track your progress. No login needed.