Make a Small, Tested Open-Source Contribution
Read the project rules first
Before changing anything, inspect the README, LICENSE and contribution guidelines (often CONTRIBUTING.md). Review open issues, check whether someone is already working on your idea and ask maintainers if the scope is unclear. A good first issue label is a starting point, not a guarantee of acceptance. Follow the project license, code of conduct and any sign-off or contributor agreement requirements. Do not assume public visibility grants unrestricted reuse.
Keep the patch focused
The fictional issue asks for a missing unit in the watering interval, not a redesign. Start from synchronized main and create feature/watering-unit. Change only notes.txt from “Water every 3” to “Water every 3 days”. Inspect the diff, verify the expected sentence and commit a descriptive message. A simple text assertion is adequate for this fictional requirement; real projects need their relevant tests and safe execution environment. Avoid unrelated formatting or dependencies.
Publish the proposal, not the decision
Push the feature to origin, not upstream. In an authorized hosted project, open a cross-fork PR with upstream main as base and the fork feature as head. Include purpose, scope, actual test results and any limitations. Maintainers decide whether to accept, request changes or close it. The offline lab checks that the upstream branch is unchanged and the diff contains only the intended file; it never opens a real PR.
Practice example
git switch -c feature/watering-unitprintf "Water every 3 days\n" > notes.txtgit diff -- notes.txtgit add -- notes.txtgit commit -m "Clarify watering interval unit"git push -u origin feature/watering-unitgit diff --name-status upstream/main...HEADRun in the synchronized lab, not in an existing project. Expected final comparison: M notes.txt; upstream main is unchanged.
Check your understanding
Write a two-sentence PR description with scope and observed result. Identify the base repository and head repository.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Make a Small, Tested Open-Source Contribution — knowledge check
Reason about fork collaboration and contribution trust boundaries.
What should you inspect before contributing?
Which patch best fits the missing-unit issue?
What is the base in the fictional cross-fork PR?
What should the test report contain?
Who decides whether upstream accepts the proposal?