What Is a Fork?
A fork copies someone else's repository into your own account.
You cannot directly edit the original repository. But once you fork it, you get your own copy where you can make changes freely. When you are done, you send a Pull Request back to the original.
Original repo Your Fork
(someone else's account) (your account)
| |
└──── Fork ────────────────>|
| edit
|
<──── Pull Request ─────────┘
This is the basic flow of open-source contribution.
Forking a Repository
- Go to the repository you want to contribute to
- Click the Fork button in the top-right
- Click Create fork
You now have a copy at github.com/youraccount/reponame.
Working on Your Fork
Create a branch in your fork and make edits.
- In the forked repository, create a new branch:
fix-typo - Find the file to edit (e.g., fix a typo in
README.md) - Edit the file and commit
Important: Always work on a branch. Editing your fork's main directly makes syncing with the original more complicated later.
Sending a PR to the Original Repository
- Go to your forked repository page
- Click Contribute → Open pull request
- Write a PR title and description
A good open-source PR description:
Title: fix: correct typo in README install command
Body:
## Changes
Fixed `npm insatll` → `npm install` typo
## Motivation
Found the typo while following the installation guide.
- Click Create pull request
The original repository's maintainer will review and decide whether to merge.
Open-Source Contribution Etiquette
Follow the project's rules to make your contributions welcome.
Before contributing:
- Read
CONTRIBUTING.mdif it exists - Check if the same Issue/PR already exists
- For large changes, propose via an Issue first and get feedback
When writing the PR:
- Keep it small (avoid too many changes in one PR)
- Explain why the change is needed
- Follow the project's code style
When receiving review feedback:
- Change requests are not criticism — they are helping improve your contribution
- Share your reasoning politely if you disagree
- Address actionable feedback promptly
"Why?" — What Open-Source Contribution Gives You
Contributing to open source is more than fixing code.
Skill growth: You read and modify code in real projects used by thousands. You learn things textbooks cannot teach.
Resume builder: "React contributor" is a powerful credential. Your name appears in the commits at github.com/facebook/react.
Networking: You collaborate with developers worldwide. Many people have landed jobs through open-source connections.
Start small — fix a typo, improve documentation. The experience of contributing is what matters.
Deep Dive
Keeping Your Fork Up to Date
When the original repository gets new commits, your fork falls behind. Here is how to sync:
On your fork's page, click Sync fork → Update branch.
The original's latest changes are now in your fork. Always sync before sending a PR.
Finding Good Projects for Your First Contribution
If you want to make your first open-source contribution:
- first-contributions: A practice repository for contributions
- good-first-issues.github.io: A collection of
good first issuelabeled issues - Your favorite tool's GitHub repository: start with documentation improvements
Translating documentation is also a great entry point.
- Fork any public repository on GitHub (e.g., a beginner practice repository).
- Create a new branch in the forked repository and edit one file.
- Open a Pull Request to the original repository (it does not need to actually be merged).
Q1. What correctly describes the difference between Fork and Branch?
- A) Fork copies within the same repository, and Branch copies to a different account
- B) Fork copies a repository to a different account, and Branch separates work streams within the same repository
- C) Fork and Branch are the same feature
- D) Fork deletes files, and Branch adds files