Loading lessons...
Project 5: Contribute to Open Source
Project 5: Contribute to Open Source
Put it all together by contributing to a real (or practice) open source project.
Step 1: Pick a project
Choose a friendly repository on GitHub. Many projects label beginner tasks with tags like "good first issue".
Step 2: Fork the repository
Click the Fork button. GitHub creates a copy under your account.
Step 3: Clone your fork
git clone https://github.com/your-username/repo.git
cd repo
Step 4: Add upstream
git remote add upstream https://github.com/original-owner/repo.git
Step 5: Create a branch
git switch -c fix-typo-in-readme
Step 6: Make and commit your change
Edit the file, then:
git add .
git commit -m "Fix typo in README"
Step 7: Push and open a pull request
git push -u origin fix-typo-in-readme
Then click Compare & pull request on GitHub and submit it.
Step 8: Stay updated
While you wait for review, sync with upstream:
git pull upstream main
TL;DR
- Fork, clone, add upstream, branch, commit, push.
- Open a pull request from your fork.
- Pull from upstream to stay current.
- Review feedback and push updates to your PR.