Sending Your First Pull Request to an Open Source Project

The steps from picking a small issue, forking, creating a branch, and pushing to opening a pull request on GitHub, and what usually happens during review.

2 min read

Your first pull request should be small: fixing a typo, correcting a wrong example in the README, or a bug that takes a few lines. The goal is to go through the whole process once, not to make a big contribution yet.

Go to the project’s Issues tab and filter by labels such as good first issue or help wanted. Read CONTRIBUTING.md (if there is one) and comment on the issue to say you plan to work on it, so no one duplicates the effort. For typos or documentation, you can usually open a PR directly.

Click the Fork button on GitHub to get a copy in your own account, then clone that fork (not the original repo). Always work on a separate branch, and don’t commit straight to main:

git clone git@github.com:<tai-khoan-cua-ban>/<ten-repo>.git
cd <ten-repo>
git checkout -b sua-vi-du-readme
# sửa file
git commit -am "Sửa tên tham số trong ví dụ README"
git push -u origin sua-vi-du-readme

After you push, GitHub shows a “Compare & pull request” button. Click it to open the PR.

Keep the PR description short, covering three points: what changed, why it changed, and, if the PR resolves an issue, write Fixes #123 so GitHub links it automatically and closes the issue on merge. If the project has a PR template, fill it out. Each PR should do one thing, so don’t add unrelated code cleanup.

Once it’s open, CI (automated checks) will run. If it’s red, look at the log, fix the problem, and push another commit to the same branch, and the PR updates itself. The maintainer may ask for further changes, for example a different naming convention, added tests, or a rebase onto the latest main. Just make the changes on the same branch and reply to the comments.

A response can arrive after a few hours or a few weeks, depending on the project. Wait a while, then leave one polite comment as a reminder, and that’s enough. If your PR is closed, that’s normal too: the project may be heading in a different direction.