Pull Request
In one line
A pull request (PR) is a proposal to merge changes from one branch into another, with code review and discussion before the merge.
In simple words
A pull request is a GitHub/GitLab feature (not a Git command) that proposes merging a branch's changes into a target branch. It provides a diff view, discussion thread, inline code comments, and approval workflow before the merge happens.
The typical flow: create a feature branch, make commits, push the branch, open a PR on GitHub targeting main. Teammates review the diff, leave comments, request changes, and approve. Once approved, the PR is merged (either via GitHub's merge button or command line).
PRs are the heart of team collaboration. They ensure code is reviewed before reaching the main branch, provide a record of why changes were made, and integrate with CI/CD to run tests automatically. The term "pull request" comes from the idea that you are requesting the target repository to pull your changes.
Example
# Create and push a feature branch
git checkout -b feature/add-login
git add .
git commit -m "Add login form"
git push -u origin feature/add-login
# Then open a PR on GitHub targeting main
# GitHub URL: https://github.com/user/repo/compare/main...feature/add-loginPush a branch, then open a PR on GitHub for review before merging.
Related terms
Related Resources
Related Lessons
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.