# Pull Requests and Forks

> How a pull request asks for a branch to be merged, and how a review catches bugs first. How a fork lets you offer a fix to a project you cannot change.

**Course:** [Git and GitHub](https://learn.benibix.com/learn/development-version-control)  
**Time:** 13 min

**After this lesson you can:**

- Open a pull request that is easy to review
- Review someone else's change
- Offer a fix to an open-source project

## How a change gets reviewed before it joins main

A pull request asks for the commits on one branch to be merged into another, usually main. It is a page on the host that shows the changes, a note on what changed and why, and a thread for comments. Teammates read it, ask questions and approve it. Many teams need at least 1 approval before it can merge.

Code review is the reading part. Reviewers look for bugs, unclear names, missing tests and simpler ways to do the job. They can comment on a single line. You answer, push fixes to the same branch, and the pull request updates by itself. When everyone is happy, someone clicks merge.

Small pull requests get better reviews. A change of 50 lines gets read line by line. A change of 2,000 lines gets skimmed and approved, because nobody can hold it all in their head. Split big work into several pull requests, each doing one thing.

A good description saves the reviewer time. Say what the change does, why it is needed and how you tested it. Link the issue it fixes. A screenshot helps for anything you can see on the screen. A reviewer who has to guess the goal ends up checking the wrong thing.

Open-source software is code anyone can read, use and change, under a licence that says so. Most of it lives on GitHub. But you cannot push to a stranger's repo. Only the people the owner lets in can do that.

A fork solves this. It is your own copy of someone else's repo, made on the website and kept under your account. You can push to it freely. You clone your fork, make a branch, commit and push to your fork. Then you open a pull request from your fork back to the original.

The owner reviews it like any other pull request, and decides whether to merge it. Many projects say how they like to get changes in a file called CONTRIBUTING.md. Read it first. It often asks for tests, a style, or an issue opened before the work starts.

Fork and clone are easy to mix up. A fork is a copy on the website, under your account. A clone is a copy on your computer. Helping an open-source project usually takes both: fork it on the site, then clone your fork to work on it.

```bash
git clone https://github.com/jack/tool.git
cd tool
git switch -c fix-readme-typo
git commit -am "Fix a typo in the README"
git push -u origin fix-readme-typo
```
After forking on the site: clone your fork, fix it on a branch, push. The site then offers to open the pull request.

![A project folder with five files, each with its job: README.md says what the project is, LICENSE says how you may use it, CONTRIBUTING.md says how to help, CODE_OF_CONDUCT.md says how to behave, and CHANGELOG.md lists what changed. CONTRIBUTING.md is marked in the accent colour, with a note that GitHub links to it when someone opens an issue or pull request.](https://learn.benibix.com/diagrams/dev5-repo-files.svg)

### Example: Jack fixes a typo in a big project

Jack spots a typo in the README of a free tool with 20,000 users. He forks it, clones his fork, fixes the one word and pushes.

He opens a pull request with a change of 1 line. A maintainer approves and merges it the next morning, and Jack's name joins the project's history.

**Words in this lesson:** [Pull Request](https://learn.benibix.com/term/development/pull-request), [Code Review](https://learn.benibix.com/term/development/code-review), [Git Fork](https://learn.benibix.com/term/development/fork), [Open Source Software](https://learn.benibix.com/term/development/open-source), [CONTRIBUTING File](https://learn.benibix.com/term/development/contributing-file)

**Question:** What is the difference between a fork and a clone?

**Answer:** A fork is a copy on the website, and a clone is a copy on your computer. A fork lives under your account on the host, so you can push to it. A clone is the copy you work on at your desk. Helping a project often takes both.

---

Source: https://learn.benibix.com/learn/development-version-control/pull-requests-and-forks
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
