How to Create a pull request in GitHub

I recently participated in my first Hacktoberfest!, which gave me the excuse to get into contributing to open-source projects.

If you haven’t already, you should consider contributing to open-source projects as they give you the opportunity to network with other developers and companies and learn from the projects you contribute to.

Here’s how it works —

  1. Fork and clone the repository

Fork and clone the repository

When contributing to another developer’s project, you must first fork and clone it.

  1. Go to the GitHub repo you want to contribute to and hit fork.

This will create a copy of the repo for you.

2. Go to your copy of the repo and clone it by clicking the green code button and copying the URL.

  • To clone the repository using HTTPS, under “HTTPS”.

3. Go to your terminal and type in “git clone URL-YOU-COPIED” and hit “enter”

Make changes/additions to the project

Open your new repo and make changes to the project.

Don’t forget to save!

Submit a pull request

  1. Go to the original repo, not yours, and copy the URL listed under the green code button.

2. Go back to your project and create a new branch:

  • In your terminal type in “git checkout -b NAME-OF-YOUR-BRANCH”

3. Git add your file, Git commit -m “your message”, git push origin NAME-OF-YOUR-BRANCH

4. Go back to your forked repository on GitHub.

5. Click “Compare & Pull Request”

6. Add details to the pull request


  • The changes you’ve made

✨✨✨And that’s it!




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tish Faroul

MHA grad & Software Engineer | Rails | React | JavaScript | CSS | HTML