Welcome, and thank you for wanting to contribute! 🎉
This guide will walk you through every single step needed to make your first contribution. Read it fully before starting.
- Prerequisites
- Step 1 — Fork the Repository
- Step 2 — Clone Your Fork
- Step 3 — Create a Branch
- Step 4 — Make Your Change
- Step 5 — Commit Your Change
- Step 6 — Push to GitHub
- Step 7 — Open a Pull Request
- Step 8 — Respond to Reviews
- Writing Good Commit Messages
- Branch Naming Convention
- Code of Conduct
Before you start, make sure you have:
- A GitHub account — Sign up here (it's free)
- Git installed on your computer — Download Git
- A text editor — VS Code is recommended
Verify Git is installed by running this in your terminal:
git --versionYou should see something like git version 2.x.x. If you get an error, Git is not installed.
What is a fork? A fork is your own personal copy of this repo on GitHub. You make changes in your fork, not the original.
- Click the Fork button at the top-right of this page
- GitHub will create a copy at
https://github.com/YOUR-USERNAME/open-source-practice - You now own this copy — do anything you like with it!
What is cloning? Cloning downloads your fork from GitHub to your local computer so you can edit files.
git clone https://github.com/YOUR-USERNAME/open-source-practice.gitReplace YOUR-USERNAME with your actual GitHub username.
Then move into the project folder:
cd open-source-practiceConnect to the original repo (called "upstream") so you can get future updates:
git remote add upstream https://github.com/anishaman6206/open-source-practice.gitVerify your remotes are set up:
git remote -vYou should see both origin (your fork) and upstream (the original).
What is a branch? A branch is an isolated workspace. Changes on your branch don't affect main until you merge.
main. Always create a new branch for every contribution.
First, make sure your local main is up to date:
git checkout main
git pull upstream mainNow create your branch:
git checkout -b your-branch-nameExample:
git checkout -b feat/add-ada-lovelace-contributorSee Branch Naming Convention for naming rules.
Open the file you want to edit in your text editor and make your change.
For example, to add your name to the Contributors table in README.md:
| Your Name | @your-github-handle | Added my name to the list |Save the file when done.
What is a commit? A commit is a snapshot of your changes with a message describing what you did.
First, check what files you changed:
git statusStage your changes (tell Git which files to include in the commit):
git add README.mdOr stage all changed files at once:
git add .Now commit with a clear message:
git commit -m "feat: add Ada Lovelace to contributors"See Writing Good Commit Messages for the format.
What is pushing? Pushing sends your local commits up to GitHub.
git push origin your-branch-nameExample:
git push origin feat/add-ada-lovelace-contributorWhat is a PR? A Pull Request asks the repo owner to review and merge your changes into the main repo.
- Go to your fork on GitHub:
https://github.com/YOUR-USERNAME/open-source-practice - You'll see a banner: "Compare & pull request" — click it
- Fill in the PR form:
- Title: Follow the format in Branch Naming Convention
- Description: Fill in the PR template (it will appear automatically)
- Click "Create Pull Request"
A maintainer will review your PR and either:
- ✅ Approve and merge it — congratulations, you've contributed!
- 💬 Request changes — they'll leave comments asking you to adjust something
If a reviewer requests changes:
- Read their comments carefully
- Make the changes on your same branch (don't create a new one)
- Commit and push again — the PR updates automatically
# Make your changes, then:
git add .
git commit -m "fix: address review comments"
git push origin your-branch-nameReply to the review comments on GitHub to let the reviewer know you've made the changes.
We follow the Conventional Commits format:
<type>: <short description>
| Type | When to use |
|---|---|
feat |
Adding something new |
fix |
Fixing a bug or error |
docs |
Updating documentation |
chore |
Maintenance tasks |
style |
Formatting, no logic change |
Good examples:
feat: add John Doe to contributors list
fix: correct typo in about.md
docs: add fun fact about elephants
Bad examples:
update stuff
changes
asdfgh
<type>/<short-description-with-hyphens>
Good examples:
feat/add-john-doe-contributor
fix/typo-in-about-md
docs/add-fun-fact-penguins
By contributing, you agree to follow our Code of Conduct.
The short version: be kind, be respectful, be patient. Everyone here is learning.
Still confused? Open a Question Issue — we're happy to help! 💬