{"id":1573,"date":"2025-10-30T14:28:14","date_gmt":"2025-10-30T14:28:14","guid":{"rendered":"https:\/\/aki-hamano.blog\/?p=1573"},"modified":"2025-10-30T14:28:14","modified_gmt":"2025-10-30T14:28:14","slug":"how-i-made-my-first-commit-to-wordpress","status":"publish","type":"post","link":"https:\/\/aki-hamano.blog\/en\/2025\/10\/30\/how-i-made-my-first-commit-to-wordpress\/","title":{"rendered":"How I made my first commit to WordPress"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/WordPress\/gutenberg\/pull\/22211\" target=\"_blank\" rel=\"noreferrer noopener\">My first contribution to WordPress development was in May 2020<\/a>. It was to the Gutenberg project, and I have continued contributing ever since. The Gutenberg project&#8217;s source code is hosted on GitHub, so I learned various things there, such as how to use git commands, manage branches, and submit pull requests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On the other hand, the WordPress core source code is managed using SVN, not Git. Although I was nominated as a core committer in July 2024 and had commit access to the codebase, I had never actually made a commit myself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this article, I would like to explain how I develop for WordPress and how I made my first commit to the WordPress core. Please note that I use a Windows OS machine.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How I develop<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Code editor and WSL<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">I use <a href=\"https:\/\/cursor.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Cursor<\/a> and have installed the WSL plugin in it and connect to various projects through it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/aki-hamano.blog\/wp-content\/uploads\/2025\/10\/cursor-wsl.png\" alt=\"Cursor\" class=\"wp-image-1468\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In short, I&#8217;m doing almost all of my development within WSL2 (Ubuntu), rather than on the host OS. Based on my experience, it offers better performance than the host OS, allowing for faster installation of npm libraries and project builds. Furthermore, a real Linux environment is running within WSL2, and I can rebuild the environment without affecting the host OS in case any problems arise.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Within that WSL environment, I have cloned <a href=\"https:\/\/github.com\/t-hamano\/wordpress-develop\" target=\"_blank\" rel=\"noreferrer noopener\">the wordpress-develop repository, which I forked to my own GitHub account<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Node version management tool<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">I use <a href=\"https:\/\/volta.sh\/\" target=\"_blank\" rel=\"noreferrer noopener\">Volta<\/a> as a version management tool for Node.js. I primarily use Node version 22, but for some projects, the scripts may not work if the Node version is too high, so I change the Node version using commands like the following:<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>volta install node@20<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command is very convenient because it automatically installs npm, which comes bundled with that Node version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Git commands and GitHub commands<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Although I&#8217;m only using very basic commands, I&#8217;ve registered the following aliases to help me work more efficiently:<\/p>\n\n\n\n<pre class=\"wp-block-code language-md\"><code>s  = status         # Show working directory status\nco = checkout       # Switch branches or restore files\nb  = branch         # List, create, or delete branches\nlo = log --oneline  # Show commit history in one line per commit<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Furthermore, I frequently use the following GitHub CLI commands to check out, review, and test pull requests locally.<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>gh pr checkout {pr_number}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Preparing to commit<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ve submitted patches and pull requests many times before, but they were all committed by other committers. To commit myself, I first needed to create a local working copy of the SVN repository.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When I asked for advice from the core committers in the Slack channel, many of the committers using Windows told me that they create their SVN copies on the host OS rather than in WSL2.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s possible that installing the Subversion CLI in WSL would allow me to commit to the core from WSL as well. However, to avoid confusion with the GitHub mirror, <code>wordpress-develop<\/code>, I decided to set up my commit environment on the host OS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Installing SVN client<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">While I prefer the command-line interface (CLI) over the graphical user interface (GUI) for Git, I&#8217;m still unfamiliar with SVN, so I installed <a href=\"https:\/\/tortoisesvn.net\/\" target=\"_blank\" rel=\"noreferrer noopener\">TortoiseSVN<\/a>, a Subversion client for Windows. I believe I used this tool in the past when I first published my own plugin to .org, but I haven&#8217;t used it much since then, so I probably uninstalled it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One important point during installation was enabling the &#8220;command line client tools&#8221; option, as I might need to use SVN command-line tools in the future:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"615\" height=\"481\" src=\"https:\/\/aki-hamano.blog\/wp-content\/uploads\/2025\/10\/tortoise-svn-install.png\" alt=\"Install TortoiseSVN\" class=\"wp-image-1503\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Next, check out the WordPress Trunk according to <a href=\"https:\/\/make.wordpress.org\/core\/handbook\/tutorials\/installing-wordpress-locally\/from-svn\/#1-check-out-wordpress-trunk\" target=\"_blank\" rel=\"noreferrer noopener\">this document<\/a>. I used the <code>wordpress-svn\/trunk<\/code> directory, also considering the possibility of creating copies of other branches in the future.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open the checked-out SVN copy in a code editor. Run <code>svn info<\/code> to confirm that the CLI is working correctly:<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>$svn info\n\nPath: .\nWorking Copy Root Path: D:Desktopwp_devwordpress-svntrunk\nURL: https:\/\/develop.svn.wordpress.org\/trunk\nRelative URL: ^\/trunk\nRepository Root: https:\/\/develop.svn.wordpress.org\nRepository UUID: 602fd350-edb4-49c9-b593-d223f7449a82\nRevision: 61089\nNode Kind: directory\nSchedule: normal\nLast Changed Author: wildworks\nLast Changed Rev: 61089\nLast Changed Date: 2025-10-30 20:54:22 +0900 (Thu, 30 Oct 2025)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Also, since I will be using Grunt tasks in the next section, we will run <code>npm install<\/code> here as well.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Furthermore, I executed the following commands:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>svn up<\/code>: Updates the local working copy to the latest state of the repository.<\/li>\n\n\n\n<li><code>svn revert -R .<\/code>: Discards all changes in the working copy.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Performing commit<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now I&#8217;m ready to commit, and my first commit will be related to this ticket:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/core.trac.wordpress.org\/ticket\/64153\" target=\"_blank\" rel=\"noreferrer noopener\">#64153 (REST API: 403 error occur when resolving or reopening note) \u2013 WordPress Trac<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Apply patch<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A GitHub pull request has been submitted and approved for this ticket. Since <a href=\"https:\/\/ja.wordpress.org\/team\/handbook\/core\/contribute\/git\/github-pull-requests-for-code-review\/\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub pull requests are for code review purposes<\/a>, this pull request cannot be merged directly. There is a convenient Grunt task available to apply this pull request to the local SVN repository, so l used that to apply the patch:<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>$ npm run grunt patch:https:\/\/github.com\/WordPress\/wordpress-develop\/pull\/10430\n\n&gt; WordPress@6.9.0 grunt\n&gt; grunt patch:https:\/\/github.com\/WordPress\/wordpress-develop\/pull\/10430\n\npackage.json has not been modified.\nRunning \"patch:https:\/\/github.com\/WordPress\/wordpress-develop\/pull\/10430\" (patch) task\nFatal error: spawn patch ENOENT<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">An error occurred: <code>Fatal error: spawn patch ENOENT<\/code>, and the patch could not be applied. After investigating this error, it appears to be caused by the <code>patch<\/code> command not being found.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fortunately, I have Git for Windows installed on my machine, and it seems to include the <code>patch.exe<\/code> command. I switched from CMD or PowerShell to Git Bash and tried applying the patch again:<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>$ npm run grunt patch:https:\/\/github.com\/WordPress\/wordpress-develop\/pull\/10430\n\n&gt; WordPress@6.9.0 grunt\n&gt; grunt patch:https:\/\/github.com\/WordPress\/wordpress-develop\/pull\/10430\n\npackage.json has not been modified.\nRunning \"patch:https:\/\/github.com\/WordPress\/wordpress-develop\/pull\/10430\" (patch) task\npatching file src\/wp-includes\/script-loader.php\n\nDone.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After applying the patch, I double-checked the changes using the svn diff command just to be sure.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Create commit message<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress has strict formatting and rules defined for commit messages. I referred to <a href=\"https:\/\/make.wordpress.org\/core\/handbook\/best-practices\/commit-messages\/\" target=\"_blank\" rel=\"noreferrer noopener\">this document<\/a> when creating my commit message:<\/p>\n\n\n\n<pre class=\"wp-block-code  language-md\"><code>Editor: Add `auth_callback` to `_wp_note_status` comment meta.\n\nAdds an `auth_callback` to the `_wp_note_status` comment meta so that only users with the `edit_comment` capability can update this meta field via the REST API. \n\nThis is necessary to ensure that users can properly resolve or reopen Notes.\n\nProps wildworks, adamsilverstein, westonruter, mamaduka, desrosj.\nFixes #64153.<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Commit using TortoiseSVN<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the future, I might perform commits using the CLI, but until I get more comfortable with SVN, I&#8217;ll use TortoiseSVN. Open File Explorer, right-click the <code>wordpress-svn\/trunk<\/code> directory, and access the TortoiseSVN > Commit menu:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"541\" src=\"https:\/\/aki-hamano.blog\/wp-content\/uploads\/2025\/10\/svn-context-menu-840x541.png\" alt=\"Context menu\" class=\"wp-image-1517\" srcset=\"https:\/\/aki-hamano.blog\/wp-content\/uploads\/2025\/10\/svn-context-menu-840x541.png 840w, https:\/\/aki-hamano.blog\/wp-content\/uploads\/2025\/10\/svn-context-menu-768x495.png 768w, https:\/\/aki-hamano.blog\/wp-content\/uploads\/2025\/10\/svn-context-menu.png 1129w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now, I pasted the commit message I prepared earlier. I also double-checked once more to make sure the files that will be changed by the commit are correct:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"609\" src=\"https:\/\/aki-hamano.blog\/wp-content\/uploads\/2025\/10\/svn-commit-prepare-840x609.png\" alt=\"Preparing commit message\" class=\"wp-image-1554\" srcset=\"https:\/\/aki-hamano.blog\/wp-content\/uploads\/2025\/10\/svn-commit-prepare-840x609.png 840w, https:\/\/aki-hamano.blog\/wp-content\/uploads\/2025\/10\/svn-commit-prepare-768x556.png 768w, https:\/\/aki-hamano.blog\/wp-content\/uploads\/2025\/10\/svn-commit-prepare.png 1085w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When I clicked the &#8220;OK&#8221; button, an authentication dialog appeared. This is because only authorized WordPress.org users can commit to WordPress SVN:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"442\" height=\"354\" src=\"https:\/\/aki-hamano.blog\/wp-content\/uploads\/2025\/10\/svn-auth.png\" alt=\"Authentication dialog\" class=\"wp-image-1556\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Enter my username and password, and then press the &#8220;OK&#8221; button. The commit process was executed, and the changes have been successfully committed!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"441\" src=\"https:\/\/aki-hamano.blog\/wp-content\/uploads\/2025\/10\/svn-commit-success-840x441.png\" alt=\"Commit finished\" class=\"wp-image-1558\" srcset=\"https:\/\/aki-hamano.blog\/wp-content\/uploads\/2025\/10\/svn-commit-success-840x441.png 840w, https:\/\/aki-hamano.blog\/wp-content\/uploads\/2025\/10\/svn-commit-success-768x403.png 768w, https:\/\/aki-hamano.blog\/wp-content\/uploads\/2025\/10\/svn-commit-success.png 880w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, I verified that this commit is also reflected in Trac (WordPress&#8217;s bug tracker and project management tool).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/core.trac.wordpress.org\/changeset\/61089\" data-type=\"link\" data-id=\"https:\/\/core.trac.wordpress.org\/changeset\/61089\" target=\"_blank\" rel=\"noreferrer noopener\">Changeset 61089 \u2013 WordPress Trac<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">References<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/make.wordpress.org\/core\/handbook\/best-practices\/when-you-become-a-committer\/core-committer-workflows\/\" target=\"_blank\" rel=\"noreferrer noopener\">Core Committer Workflows \u2013 Make WordPress Core<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/make.wordpress.org\/core\/handbook\/best-practices\/when-you-become-a-committer\/\" target=\"_blank\" rel=\"noreferrer noopener\">When you become a committer \u2013 Make WordPress Core<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/make.wordpress.org\/core\/handbook\/tutorials\/installing-wordpress-locally\/from-svn\/\" target=\"_blank\" rel=\"noreferrer noopener\">Installing via SVN \u2013 Make WordPress Core<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/make.wordpress.org\/core\/handbook\/contribute\/git\/github-pull-requests-for-code-review\/\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub Pull Requests for Code Review \u2013 Make WordPress Core<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/make.wordpress.org\/core\/handbook\/best-practices\/commit-messages\/\" target=\"_blank\" rel=\"noreferrer noopener\">Commit Messages \u2013 Make WordPress Core<\/a><\/li>\n<\/ul>\n\n\n\n<div style=\"height:var(--wp--preset--spacing--70)\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Props to folks who gave me advice and helped me with my first commit.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>My first contribution to WordPress development was in May 2020. It was to the Gutenberg project, and I have co [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"https:\/\/aki-hamano.blog\/?p=1461","footnotes":""},"categories":[17],"tags":[],"class_list":["post-1573","post","type-post","status-publish","format-standard","hentry","category-wordpress-core","en-US"],"_links":{"self":[{"href":"https:\/\/aki-hamano.blog\/wp-json\/wp\/v2\/posts\/1573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aki-hamano.blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aki-hamano.blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aki-hamano.blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aki-hamano.blog\/wp-json\/wp\/v2\/comments?post=1573"}],"version-history":[{"count":29,"href":"https:\/\/aki-hamano.blog\/wp-json\/wp\/v2\/posts\/1573\/revisions"}],"predecessor-version":[{"id":1602,"href":"https:\/\/aki-hamano.blog\/wp-json\/wp\/v2\/posts\/1573\/revisions\/1602"}],"wp:attachment":[{"href":"https:\/\/aki-hamano.blog\/wp-json\/wp\/v2\/media?parent=1573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aki-hamano.blog\/wp-json\/wp\/v2\/categories?post=1573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aki-hamano.blog\/wp-json\/wp\/v2\/tags?post=1573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}