Send a Pull Request to Another Fork on GitHub

fork

Series:
Posted on

Over the past few months, I’ve been working on merging the WordPress plugin SEO Extended into WordPress SEO by Yoast. The whole process taught me many great things about git, GitHub, and social coding. So today I’m going to share how to send a pull request to another person’s fork on GitHub!

After I went through the effort of merging SEO Extended into my fork of WordPress SEO, I sent a pull request to the main repo on GitHub. Joost de Valk wanted to run a large beta test on the functionality added from SEO Extended, so he asked that I send a pull request to the fork maintained by¬†Juliette Reinders Folmer. Figuring out how to send a pull request to the original repo I forked was hard enough, but after some blind clicking and guessing, I figured out how to send a pull request from my fork of WordPress SEO to Juliette’s fork of WordPress SEO.

Here’s how you can send a pull request from your fork of a GitHub repo, to another person’s fork of that same GitHub repo:

Step 1 – Go to the GitHub page of the other person’s fork and click “Pull Requests”

The location of "Pull Requests" on a GitHub repo

Step 2 – On the Pull Requests page, click the button labeled “New pull request”

Location of the "New pull request" button on GitHub

Step 3 – Click the “Edit” button and change the head fork and base fork.

Edit the GitHub repos being compared in the pull request

I don’t know many of the terms used in Git and GitHub, but from what I gather the head fork is the repo you want to send in the pull request and the base fork is the repo you want to send your pull request to. So I chose my fork (Faison/wordpress-seo-main) for the head fork, and Juliette’s fork (jrfnl/wordpress-seo) for the base fork. For my pull request, I was also asked to send it to a specific branch of Juliette’s fork, so I used the dropdown next to the base fork to select the appropriate branch.

Edit the base fork and head fork of a pull request

Step 4 – Click the area that says “Click to create a pull request for this comparison” and add a title and message.

For this step, you want to make sure you tell the person what your pull request is for. So for mine, I used the title “Merged SEO Extended into WordPress SEO”, and just explained that it was the same as the first pull request I sent to the main WordPress SEO repo.

Step 5 – Send your pull request by clicking the button labeled “Send pull request”

Send your pull request on GitHub

After pressing that button, you successfully sent a pull request from your fork to another fork of the same GitHub repository! The next step is to wait for that person to merge the request or reply for some follow up questions.

Start Contributing Today

Figuring this out started me down the path of contributing to WordPress SEO much more than I first anticipated and it’s why I look forward to contributing to many more WordPress plugins in the future. Unlike me, you don’t have to spend time shooting in the dark, trying to find out how to accomplish this task. Now that you know how to send pull requests to other forks of the same GitHub repo, you have another valuable skill to help your social coding on GitHub. So go to the GitHub repo of one of your favourite WordPress plugins and start sending your pull requests today!


Leave a Reply

Your email address will not be published. Required fields are marked *