How To Create A Pull Request On GitHub

How To Create A Pull Request On GitHub

Start Contributing To Open-Source Projects Now!

Hey dev 👋, probably it's going to be the first time you make your own pr and contribute to open source.

So, you know how to use git. You have a GitHub repo and can push to it. All is well. But how the heck do you contribute to other people's GitHub projects? Read My Top Git Commands for every developer here :

image.png My first was sometime back when I edited documentation of DailyDotDev and later did I find out that I was the first contributor to their official docs and won a t-shirt worth 30$ from their swag store!

Steps Involved 🚀 :

🔹 Find a project you want to contribute to:

For purposes of hands-on, I have created a repo on my GitHub and I have set it to the public containing some python code, feel free to use that, I will be monitoring all merge requests:

Testing Repo :

🔹 Fork it

image.png After firing that's what will be showing in your github

🔹 Clone it to your local system

git clone

🔹 Navigate to your local repository

cd Testing_PRs

🔹 Make a new branch: Use any branch name you want:

git checkout -b "branch2"

🔹 You will see this:

Switched to a new branch 'branch2'

🔹 Make your changes

With your favourite code editor, add anything in my file: Could be a comment.

🔹 Back to the terminal: Check Status


🔹 Add & Commit:

git add .
git commit -m "added a comment"

🔹 To push back to your repo:

git push --set-upstream origin branch2

🔹 Click the Compare & Pull request button on Github

This will automatically pop up after pushing your changes

🔹 Click Create pull request to open a new pull request

You can add comments and meaningful ones to describe your changes:

If you happen to get any errors: consider reading
🔹GitHub Docs

The changes and branch will reflect on my side and I will merge to main, after that you can delete the branch since i already merged your request.

Congratulations on making your first open-source contribution! 🎉

Now Go Contribute More: >>>

If you enjoyed reading, consider subscribing and reacting to this with love by sharing, commenting and any criticism is much welcome.

🔹Follow me on Twitter:

Ronnie Atuhaire