DEV Community

Cover image for Making Your First Pull Request
Francesco Sardone
Francesco Sardone

Posted on • Edited on

Making Your First Pull Request

Contents

Introduction

Hey there! I'm Francesco known as Airscript on the web.
Today I want to share with you how you can contribute to an open source project making your first pull request to it!

Requirements

In order to make it, we'll use solely GitHub, since going into depth with tools and programming languages can be hard at first.
So the only requirement needed is an account on GitHub.

Searching For A Project

After you've got your GitHub account, we just need to search for a project to contribute to.
We have different options here: known projects, using the search bar, using the explore section and so on. It's really up to you.
If you're interested on how to do project scouting, let me know and I'll make a blog post specific to it.
For this blog post, I have chosen option A and so I'll be doing the pull request to a known project of a close connection.

Forking

The first action to do when contributing to open source projects, is to make a fork of the repository.
This comes true when you don't have direct push access to those repositories.
The fork process is easy to do as clicking a simple button on GitHub:

Fork

After clicking that button, GitHub will ask us where we want to place the repository and how we want to name it:

Create New Fork

Let's keep everything as default and click the fork button.
Ta-da! Our first fork has been done.
Now the repository will be copied over the profile you have chosen.

Making Your Changes

Now that you did the fork, you got a copy of that project over your profile or the one that you've chosen to.
Because of this, we can just do our changes safely without worrying about being blocked for lack of permissions.
As I told you, this blog post just covers the basics of how you can do your first pull request taking out all the tech jargon you can from the process.
So even for our changes, we'll use GitHub's editor:

Edit File

The edit option is placed on top right corner, just right when you select the file to be edited.
Clicking it, you'll just go inside the editor where you can make the changes.
After you have done that, we have to commit:

Commit Changes

Clicking on commit changes will open a modal where we can choose a bunch of things:

Propose New Changes

Things like a commit title and description or the branch where we want to commit.
For the purpose of this post we want to choose main branch, like I did in this photo.
This help us cutting of the process of doing feature branching on our forked repository before doing the actual Pull Request to the project owner.
After clicking the green button, we are ready for opening our first Pull Request!

The Pull Request

Let's head back to our forked repository page and click onto the contribute button:

Contribute

Here we can click onto the green button for opening the actual Pull Request and GitHub will just launch us towards a page like this one:

Open Pull Request

And after you've applied a title and a description to what you are changing, just click again the green button and ta-da! You made it!

Conclusion

In this blog post we actually have seen how to make our first pull request to our chosen open source project.
Bear in mind that we have actually looked only at the process and that in reality this can take up extra effort.
For example, the need to read how to contribute specifically to a project or, keeping behind the lifecycle of a pull request starting from change requests to failing pipelines.
I hope you have found this useful and if you want something deeper regarding this kind of topic, just reach me out!

Share Support

If you have liked this post, just come and tell me!
Are you too shy for doing this? No problem. Just visit airscript.it and share your support following me on your preferred social platform.
If you want to make me even happier, just follow, share or star me and my projects on GitHub.

Top comments (0)