PART VIII · DEVELOPMENT & GIT

Pull Request

A collaboration request asking others to review and merge changes from one branch into another.

01

What is it?

A pull request is a collaboration request asking others to review and merge changes from one branch into another.

It gives a team a clear place to discuss proposed code changes before they are merged.

A pull request asks a team to review proposed changes.

02

Think of it like...

Think of a pull request as asking teammates to check your work before it becomes part of the shared project.

Developer Branch
→↓
Pull Request
→↓
Code Review
→↓
Main Branch
03

What does it do?

A pull request can:

Show Proposed Changes
Start Code Review
Collect Comments
Record Approvals
Run Automated Checks
Request a Merge
04

Where is it used?

Pull requests are used in:

Team Development
GitHub Repositories
GitLab Projects
Bitbucket Repositories
Open-source Projects
05

Example

A Feature Branch Adds a Save Button

Feature Branch
→↓
Pull Request
→↓
Code Review
→↓
Approved
→↓
Merge
→↓
Main

The pull request gives others a place to inspect the change before it joins the main branch.

06

How it connects

Requirement
→↓
Code
→↓
Git
→↓
Commit
→↓
Branch
→↓
Pull Request
→↓
Code Review
→↓
Merge
→↓
Build
→↓
Release
→↓
Deploy

A pull request connects a developer's branch to the shared project through review.

07

Do Not Confuse

Pull Request ≠ Merge

Pull Request

A request to review and combine changes.

Merge

The action that combines changes from different branches.

Pull Request = Proposal + Review

Merge = Combine Changes

08

Topic Glossary

ENGLISH TERM中文SIMPLE ENGLISH中文小白理解
Pull Request合并请求A request to review and merge changes from one branch into another.请求审查并将一个分支的代码合入另一分支。
Branch分支An independent line of development.独立进行代码开发的一条版本线。
Code Review代码审查The process of checking proposed code changes.检查和讨论准备合入的代码修改的过程。
Merge合并Combining changes from different branches.把不同分支中的代码修改组合起来。
Main主分支The shared primary branch of a repository.代码仓库中大家共享的主要分支。
Commit提交A recorded set of code changes.一次被记录下来的代码修改。
Repository代码仓库A managed location for source code and its history.集中保存源代码及其版本历史的位置。
Approval批准A review decision allowing proposed changes to proceed.表示代码修改通过审查、可以继续推进的决定。
Check检查An automated or manual validation of proposed changes.对准备合入的修改进行自动或人工验证。
Diff差异The changes between two versions of code.两个代码版本之间发生变化的部分。
Source Branch源分支The branch containing the proposed changes.包含准备提交审查的代码修改的分支。
Target Branch目标分支The branch that may receive the proposed changes.可能接收这些代码修改的目标分支。
09

What to Remember

01

A pull request proposes changes from one branch to another.

02

Code review happens before the changes are merged.

03

A pull request connects branch work with the shared project.

Branch
→↓
Pull Request
→↓
Review
→↓
Merge

A pull request makes proposed code changes visible, reviewable, and ready to merge.

↑