Skip to content
Ahmad Ammar

5. Propose it and follow it through

5.1 Open the pull request

Go to your fork on GitHub. A yellow band usually shows your recent branch with a green button, Compare & pull request. Press it. If there is no band, press the Pull requests tab, then New pull request, and choose your branch.

Check the top line of the form. It shows that your branch will go into the original project’s main. Then write a title and a description. Say what you changed, why, and how you checked it. Here is a good example:

Title: Fix spelling of CSV in the README

The README said the tool reads a "CVS" file, but the code reads CSV.
I changed that one word. No code changed, so there are no tests to run.

If this settles an issue, add a line saying Fixes #12, using the issue’s number. GitHub will then close that issue when your change is accepted. Press Create pull request.

5.2 What happens next

Automatic checks may start and show a yellow dot, then a green tick or a red cross. Press Details beside a red cross to read why it failed. A maintainer will read your change when they have time, and that can take days or weeks because many of them are volunteers. If you hear nothing for two weeks, one polite comment asking if they need anything else is reasonable.

5.3 Answering comments

Requests for changes are normal and are not a judgement of you. Experienced contributors receive them all the time. To update your proposal, change the files on the same branch and push again. The pull request updates itself, so you never need to open a new one.

git add README.md
git commit -m "Reword after review"
git push

If a maintainer declines, thank them and move on. The reason is often about the project’s direction, and your fork still has your work.

5.4 After it is accepted

Your name now appears in the project’s history. Tidy up by bringing the new work into your copy, so your next change starts from the latest version:

$ git switch main
Your branch is up to date with 'origin/main'.
Switched to branch 'main'
$ git fetch upstream
From https://github.com/their-name/their-project
 * [new branch]      main       -> upstream/main
$ git merge upstream/main
Updating 1a2b3c4..5d6e7f8
Fast-forward
 CHANGES.md | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 CHANGES.md
$ git push origin main
To https://github.com/your-name/their-project.git
   1a2b3c4..5d6e7f8  main -> main

You can then delete the old branch. GitHub offers a button for this on the pull request’s page, and locally you type git branch -d fix-readme-spelling.

5.5 Being a good contributor

Keep each pull request to one change, which makes it quick to review. Follow the style of the code around you, even where you would choose differently. Read CONTRIBUTING.md and any code of conduct first. And if you used an automatic tool to write any of it, check the project’s rules on that, make sure you understand every line you submit, and be open about it when asked.

5.6 When something goes wrong

What you see What to do
Permission denied when pushing You are probably pushing to the original rather than your fork. Run git remote -v, and check that origin shows your username.
You committed on main by accident Run git switch -c new-branch-name, which carries your commit onto a new branch.
This branch has conflicts Someone changed the same lines. Run git fetch upstream, then git merge upstream/main. Open the files Git names, keep the right text, delete the marker lines, then add, commit and push.
A check fails for something you did not touch Say so in a comment, as it may already be broken for everyone.
Please tell me who you are Run the git config lines from the install chapter, then repeat the commit.