December 5, 2025
The Open Source Workflow: Fork → Branch → PR (Explained Simply, Step-by-Step)
How real contributions actually happen — and how to build confidence in the process.
By Ritik Singh
3 min read
If you're new to open source, the workflow can feel intimidating. People keep throwing around words like fork, branch, PR, merge, and you're sitting there wondering:
"Okay, but what actually happens from the moment I click Fork to getting my pull request merged?"
Don't worry — this is the blog I wish I had when I started contributing.
Let's break it down step-by-step, in plain English, with zero jargon and zero gatekeeping.
Why This Workflow Matters
Fork → Clone → Branch → Commit → Push → Pull Request (PR)
This isn't just a process. It's the backbone of almost every open-source contribution in the world, from tiny tools to billion-dollar frameworks.
Once you understand this workflow, you can confidently contribute to any project, on any repo, at any time.
Step 1: Fork — Your Personal Copy of the Project
When you click the Fork button on GitHub, you're basically saying:
"Hey, give me my own copy of this project so I can make changes safely."
Important points:
- A fork lives under your GitHub account.
- You can do anything with it — experiment, break things, test features.
- You're not touching the original repository yet. Zero pressure.
This is your sandbox.
Step 2: Clone — Bring the Project to Your Machine
Forking creates the copy. Cloning brings that copy to your laptop.
git clone https://github.com/your-username/project-name.gitgit clone https://github.com/your-username/project-name.gitNow you have a local version where you can code, test, and run the project offline.
Step 3: Create a Branch — Your Safe Workspace
Never write code on the main branch.
Even maintainers don't do that.
Instead, create a branch:
git checkout -b fix-login-buggit checkout -b fix-login-bugWhy?
- Keeps changes organized
- Allows multiple PRs at once
- Makes review easier
- Prevents messy conflicts
Your branch name should describe what you're doing:
fix-typo-readmeadd-dark-modeimprove-docsrefactor-api-client
This is where your contribution lives.
Step 4: Make Changes — Write the Code / Fix the Issue
Now you start working. You can fix bugs, add features, or improve documentation.
Every change, even tiny ones, get committed.
Step 5: Commit — Save Your Work with a Message
A commit is like pressing "Save" with notes attached.
git add .
git commit -m "Fix login bug caused by missing null check"git add .
git commit -m "Fix login bug caused by missing null check"Good commit messages help maintainers understand:
- What you changed
- Why you changed it
- How it helps the project
This builds trust. Trust = faster merges.
Step 6: Push — Upload Changes Back to GitHub
Once your commits are ready:
git push origin fix-login-buggit push origin fix-login-bugYour branch now appears on your GitHub fork.
You're ready for the final step.
Step 7: Open a Pull Request (PR)
The PR is the magical moment where your work meets the original project.
You're basically saying:
"I made this improvement in my fork/branch. Please review and merge it."
A PR includes:
- Title ("Fix login bug on OAuth flow")
- Description (what changed + why)
- Screenshots or tests if needed
- Reference to issue number (
Closes #42)
A good PR makes a maintainer smile. A confusing PR makes a maintainer close the tab.
Step 8: Review — Maintainers Give Feedback
This is normal. Even senior developers get review comments.
Maintainters may ask you to:
- Simplify something
- Fix an edge case
- Add tests
- Follow coding style
- Update documentation
Just commit more changes — they're automatically added to the PR.
This back-and-forth is how collaborative software is built.
Step 9: Merge — Your Contribution Becomes Part of the Project
Once your PR is approved, it's merged into the main codebase.
Congratulations — you just became an open-source contributor.
This is the moment where your name gets added to the contributor list and your code becomes part of a project used by developers around the world.
That's a powerful feeling.
The Fork → Branch → PR Loop (Visually)
Fork project →
Clone it →
Create a branch →
Write code →
Commit →
Push →
Open PR →
Review →
MergeFork project →
Clone it →
Create a branch →
Write code →
Commit →
Push →
Open PR →
Review →
MergeLearn this once. Use it forever.
Common Beginner Mistakes (and How to Avoid Them)
❌ Working directly on main
✔ Always create a new branch.
x Huge PR with 50 files changed
✔ Keep PRs small and focused.
x Bad or unclear commit messages
✔ Explain what you did and why.
x Not syncing your fork
✔ Pull latest changes often using upstream.
How This Workflow Builds Confidence
When you contribute this way, you learn:
- Professional Git workflow
- How reviewers think
- How teams collaborate
- How to read existing codebases
- How to communicate like a dev
- How real software development feels
Most beginners think they need to be "good enough" before contributing. But the truth is:
You become good by contributing.
Confidence is built step-by-step, PR by PR.
Final Thoughts
The open source workflow isn't complicated — it's a series of small, safe steps designed to help you contribute without fear of breaking anything.
And once you understand Fork → Branch → PR, the world of open source becomes wide open.