Pull Requests: A Structured Conversation About Code

A Pull Request (PR) is a structured conversation about a proposed code change. It's used in team projects to review new features and fixes, ensuring quality and sharing knowledge. The footgun is treating PRs as a rubber-stamp approval instead of a real review.
Why it exists
Pull Requests exist to create a formal, collaborative process for proposing, discussing, and reviewing code changes before they are integrated into a shared codebase. This prevents unilateral changes from breaking the main project and serves as a crucial tool for improving overall code quality and sharing knowledge across a team.
The mental model
A Pull Request (or Merge Request) isn't just a Git operation; it's a conversation with a paper trail. It's a dedicated forum where a developer proposes a change, and the team can discuss it, suggest improvements, and formally approve it before it becomes part of the main project. You are formally asking the project to 'pull' your changes in.
How it works
A developer creates a PR to propose merging their feature branch into a target branch like 'main'. Anyone with read access can then review the proposed changes. Reviewers can comment on specific lines of code, suggest direct changes, and submit their review with one of three statuses: 'Comment' (to offer feedback without a verdict), 'Approve' (to sign off on the changes), or 'Request changes' (to block the merge until issues are resolved). The author can then incorporate the feedback and push more commits to the PR, which appear in the same conversation timeline.
When to use it
Use PRs for any non-trivial change in a collaborative software project. This is the standard for proposing new features, fixing bugs, and refactoring code in a team setting. It's the primary mechanism for code review on platforms like GitHub and GitLab. You can also use them in solo projects to review your own work before merging.
When not to use it
In a team setting, you should almost always use a PR. The main exception might be an emergency hotfix deployed via a 'break-glass' procedure, but even that is often followed up with a retroactive PR for documentation. For truly trivial, solo-developer changes on a personal project, you might merge directly, but using PRs is still good practice.
One canonical example
A repository administrator configures the 'main' branch as a 'protected branch' that requires at least one approving review before a PR can be merged. A developer submits a PR with a bug fix. The system automatically requests a review from the team listed in the CODEOWNERS file for the code being changed. A teammate reviews the code, suggests a small change to a variable name, and the author pushes a new commit to address the feedback. The teammate then approves the PR, which unblocks it for merging.
Interview question
What is the primary role of a Pull Request in a team's software development workflow?
- a.To directly trigger the deployment of new features to production environments after a successful build.
- b.To automatically merge a developer's feature branch into the main branch upon completion.
- c.To provide a formal mechanism for discussing, reviewing, and approving code changes before integration.Correct
- d.To track the individual contributions and commit history of each developer in the project.
Why? this is the answer
The card emphasizes that a Pull Request is a "structured conversation about a proposed code change" and exists "to create a formal, collaborative process for proposing, discussing, and reviewing code changes." While merging is the ultimate goal, the core purpose is the review and discussion. Option B is a tempting distractor because merging is the outcome, but it misses the crucial review and approval steps.
Just read this? Test yourself on what you have been reading.
Read the original → docs.github.com
- #git
- #collaboration
- #code review
- #ci/cd
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on git — each one lists the topics its interview covers.
See open roles