🤝 Module 03 — Contributing to Open Source
The exact sequence behind literally every “fixed a typo in a famous project” screenshot you’ve ever seen on LinkedIn.
By the end of this module you will be able to:
✓ Fork a repository and explain what that actually created
✓ Keep your fork in sync with the original project (origin vs. upstream)
✓ Open a pull request that’s likely to get merged quickly
✓ Find a genuinely beginner-friendly issue to contribute to, today
📑 In This Module
- Fork — Your Own Copy of Someone Else’s Repo
- Clone from GitHub
- Send a Pull Request
- The Full Contribution Flow, End to End
- Glossary (Module 03 Terms)
🍴 Fork — Your Own Copy of Someone Else’s Repo
🎭 The real-life example
You don’t have the keys to someone else’s house, but you can photocopy their blueprint and build your own version on your own land. A fork is GitHub creating a full copy of someone else’s repository under your own account — you own this copy completely, can do anything you want to it, and none of it affects the original until you explicitly propose changes back.
💻 The technical example
On GitHub: open the repo you want to contribute to → click Fork (top right) → GitHub creates
github.com/yourusername/their-repo as a full copy, including its entire history.
You do not have push access to the original repo — that’s the entire point of forking. It’s how strangers on the internet can propose changes to projects they don’t have write access to, without any risk to the original.
⌨️ TRY IT YOURSELF
Pick any small public repo on GitHub (even this git-tutorials repo works fine for practice) and
click Fork (top right). That’s the whole action — no terminal needed yet.
What should I see? A new repo under your account, named the same thing, with “forked from” and a link back to the original shown right under the repo name.
📥 Clone from GitHub
Now bring your fork down to your own machine to actually work on it:
git clone git@github.com:yourusername/their-repo.git
cd their-repo
# Add the ORIGINAL repo as a second remote, conventionally named "upstream"
git remote add upstream git@github.com:original-owner/their-repo.git
git remote -v
# origin git@github.com:yourusername/their-repo.git (your fork)
# upstream git@github.com:original-owner/their-repo.git (the real original)
🎭 The real-life example
origin is your photocopy of the blueprint — you push your changes here. upstream is the
original architect’s blueprint — you only ever pull from here, to stay in sync with what the
real project is doing while you work. Confusing these two is the single most common beginner
mistake in open-source contribution: pushing to upstream will just fail (you don’t have
permission), but pulling from origin thinking it’s upstream means you silently miss weeks of
the real project’s progress.
# Keep your fork in sync with the real project regularly
git fetch upstream
git checkout main
git merge upstream/main
git push origin main # update YOUR fork's copy on GitHub too
⌨️ TRY IT YOURSELF (using the fork you just created)
git clone git@github.com:yourusername/your-fork-name.git
cd your-fork-name
git remote add upstream <the-original-repo's-SSH-url>
git remote -v
What should I see? origin pointing at your fork, upstream pointing at the original — four
lines total from git remote -v (fetch + push for each).
🧠 Quick Check: You accidentally run git push upstream main instead of git push origin main. What happens?
It fails — you don't have write access to `upstream` (the original repo), which is the entire
point of the fork workflow. This is a genuinely safe mistake to make: Git will refuse with a
permission error, not silently do something destructive. The more dangerous version of this
mix-up is the opposite direction — accidentally *pulling* from `origin` when you meant
`upstream`, which doesn't error, it just silently leaves you out of sync with the real project.
📬 Send a Pull Request
# 1. Create a branch for your specific change — never work directly on main
git checkout -b fix/typo-in-readme
# 2. Make your change, commit it
git add README.md
git commit -m "docs: fix typo in installation instructions"
# 3. Push to YOUR fork (origin), not upstream
git push -u origin fix/typo-in-readme
4. Open the Pull Request on GitHub: navigate to your fork, GitHub will show a banner offering to “Compare & pull request” for your just-pushed branch. Click it, write a clear title and description explaining what changed and why, and submit.
🎭 The real-life example
A pull request is a formal, reviewable proposal: “here’s a specific change I made to my copy — please consider merging it into yours.” The project maintainer reviews it, may ask for changes (you just push more commits to the same branch — the PR updates automatically), and eventually either merges it or closes it.
✍️ Writing a PR that actually gets merged
## What
Fixes a broken installation command in the README (missing `--save-dev` flag).
## Why
Following the current instructions installs the package globally instead of as a
dev dependency, which breaks the project's own build script.
## How I tested it
Ran the corrected command on a fresh clone — build script now completes successfully.
[!TIP] Small, focused PRs get merged fast. A PR that fixes one typo gets reviewed in 30 seconds. A PR that “also refactored some other stuff while I was in there” makes the maintainer’s job much harder, and sits unreviewed far longer. If you notice something else worth fixing, that’s a second PR, not scope creep on the first one.
🎯 YOUR TURN — Your first real contribution
Using the fork you set up above (any public repo, including this one): find one genuinely small,
real thing worth fixing — a typo, a broken link, an outdated command — make the fix on a properly
named branch, push it to origin, and open the pull request. This is a real PR, not a drill.
💡 Not sure where to find something to fix?
Search GitHub for issues labeled `good first issue` across any language you're comfortable in (or check [goodfirstissue.dev](https://goodfirstissue.dev/)). If genuinely nothing jumps out, even fixing a typo in this course's own docs and opening a PR against [ghanendra-sdet/git-tutorials](https://github.com/ghanendra-sdet/git-tutorials) counts — the mechanism is identical regardless of project size.🔁 The Full Contribution Flow, End to End
flowchart TD
A["Find a project you want<br/>to contribute to"] --> B[Fork it on GitHub]
B --> C["Clone YOUR fork locally"]
C --> D["Add upstream remote<br/>pointing to the original"]
D --> E["Create a branch for<br/>your specific change"]
E --> F["Make the change, commit"]
F --> G["Push to origin<br/>your fork"]
G --> H["Open a Pull Request<br/>fork → original repo"]
H --> I{Maintainer<br/>reviews}
I -->|Changes requested| F
I -->|Approved| J["Merged! 🎉"]
style B fill:#fff3cd,color:#1a1a1a
style H fill:#cfe2ff,color:#1a1a1a
style J fill:#d4edda,color:#1a1a1a
That’s genuinely the entire mechanism behind every open-source contribution you’ve ever seen — from a one-line typo fix to a massive feature added to a project with a million users. The process is identical; only the size of the diff changes.
[!NOTE] Don’t know where to start? Look for issues labeled
good first issue— most active open-source projects tag beginner-friendly issues specifically so new contributors have a clear, low-risk entry point. It’s a genuinely great way to build a real, public contribution history.
📖 Glossary (Module 03 Terms)
| Term | Meaning |
|---|---|
| Fork | Your own full copy of someone else’s repository, under your GitHub account |
| Upstream | Convention name for a remote pointing at the original repo you forked from |
| Origin (in a fork context) | Convention name for the remote pointing at YOUR fork |
| Pull Request (PR) | A formal, reviewable proposal to merge changes from one branch/fork into another |
good first issue |
A common label maintainers use to flag beginner-friendly contribution opportunities |
✅ Quick Check-In
- What’s the actual difference between
originandupstreamin a fork-based workflow? - Why does a small, focused PR get merged faster than a large one that “also cleaned up a few other things”?
- You just pushed a fix, but the maintainer asked for a small change — do you close this PR and open a new one, or do something else?
(#3: just commit the fix and push to the same branch — the existing PR updates automatically. Opening a new PR for review feedback is a surprisingly common beginner instinct, and it’s unnecessary extra noise for the maintainer.)
🧠 You can now:
✓ Fork a repo and explain exactly what that did and didn’t give you access to
✓ Keep a fork in sync with the real project via upstream
✓ Open a pull request that’s actually likely to get reviewed and merged quickly
✓ Find a real good first issue and make your first genuine open-source contribution