[wp-meta] [Making WordPress.org] #8007: Rewrite and clarify “Adding your GitHub fork to your WP trunk copy” section for accuracy and readability

Making WordPress.org noreply at wordpress.org
Thu Jun 19 12:05:28 UTC 2025


#8007: Rewrite and clarify “Adding your GitHub fork to your WP trunk copy” section
for accuracy and readability
-------------------------+-----------------------
 Reporter:  tomd6r       |       Owner:  psykro
     Type:  enhancement  |      Status:  assigned
 Priority:  low          |   Milestone:
Component:  Handbooks    |  Resolution:
 Keywords:               |
-------------------------+-----------------------

Comment (by psykro):

 @tomd6r here is my suggested update, covering both options. Please let me
 know what you think.


 == Submitting a patch via GitHub

 The WordPress core code has a [GitHub mirror](https://github.com/wordpress
 /wordpress-develop) that allows you to create a patch via GitHub. This is
 useful for contributors who prefer using GitHub for code reviews and
 collaboration.

 To contribute via GitHub, you’ll need to fork the WordPress GitHub mirror,
 clone it locally, create a branch for your changes, and push the branch to
 your fork.

 1. Create a fork of the `wordpress/wordpress-develop` mirror under your
 own GitHub account, using the **Fork** option at the top of the GitHub
 page.
 2. Clone your fork to your local computer. Use the SSH or HTTPS URL
 depending on your requirements. Replace `your-username` with your GitHub
 username.

 `git clone git at github.com:your-username/wordpress-develop.git`

 3. Create a new branch to work on a specific Trac ticket. Never work
 directly on trunk. A good practice is to name your branch after the Trac
 ticket number, and a brief description of the change. For example, if the
 ticket number is #44722, you might use `44722-fix-issue-in-component`:

 `git checkout -b 44722-fix-issue-in-component`

 4. Make your code changes, commit them, and push your branch to your fork.

 `git push origin 44722-fix-issue-in-component`

 5. Go to your fork on GitHub. If your GitHub account is linked to your
 WordPress.org profile, GitHub will prompt you to open a Pull Request. Make
 sure the title includes the Trac ticket number (e.g., #44722: Fix X issue
 in Y component).

 If you've already cloned the `wordpress/wordpress-develop` mirror locally,
 and you want to create a patch, you can add your fork to the local clone.

 1. First, create the fork on GitHub, as detailed in step 1 above.
 2. Then, add your fork as a remote repository in your local clone:

 `git remote add fork git at github.com:your-username/wordpress-develop.git`

 3. Fetch all remotes to make sure you have the latest updates:

 `git fetch --all`

 4. When creating the branch locally, make sure to specify the remote
 branch.

 `git checkout -b 44722-fix-issue-in-component fork/trunk`

 5. Alternatively, if you’re checking out an existing branch from your
 fork:

 `git checkout fork/44722-fix-issue-in-component fork`

 6. After making your changes, commit them and push to your fork:

 `git push fork 44722-fix-issue-in-component`

 For more details on GitHub integration, see the GitHub Pull Requests for
 Code Review documentation
 (https://make.wordpress.org/core/handbook/contribute/git/github-pull-
 requests-for-code-review/).

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/8007#comment:7>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list