AI Hints
Home›Git & GitHub Tutorial›Forks and Open Source
Git & GitHub · Lesson 77 of 144

Contributing to Open Source

A friendly first pull request.

⏱ 2 min read▶ Video at 1:23:43🎓 Free
Watch this lesson in the Git & GitHub courseWatch on YouTube ↗Full Git & GitHub course

Contributing to open source is a great way to learn, and to build your profile. You don't have to write big features. Fixing a typo in the documentation is a real, welcome contribution.

Contributing to Open Source
From the video: Contributing to Open Source
  • Learn, and build your profile
  • Start small
  • Typos count!

Before you start

Before you start, read the project's readme, and its contributing file, if it has one. Look for issues labelled good first issue. Leave a comment on the issue, saying you'd like to work on it. And keep your first pull request small and focused.

READMEwhat the project is
CONTRIBUTING.mdhow they like help
good first issuebeginner-friendly tasks
Small PRone focused change

A contribution, start to finish

Here's a full contribution. A fresh branch, from an up to date main. Add a new tip, and commit with a clear message. Push the branch to our fork. Then on GitHub, we'd open a pull request, from sam's branch, to octo's main.

git
git switch -c add-stash-tip
Switched to a new branch 'add-stash-tip'
echo '- Use git stash to save unfinished work' >> tips.md
git commit -am "Add a tip about git stash"
[add-stash-tip 81934a4] Add a tip about git stash
 1 file changed, 1 insertion(+)
git push -u origin add-stash-tip
To https://github.com/sam/awesome-tips.git
 * [new branch]      add-stash-tip -> add-stash-tip
branch 'add-stash-tip' set up to track 'origin/add-stash-tip'.

Summary

Read the contributing guide, start small, branch, push to your fork, and open a pull request. Next, how teams organise all this work.

Key takeaways
  • Read CONTRIBUTING.md
  • good first issue
  • Small, focused PRs
Next up: GitHub Flow — a simple team workflow