Recap: Restoring removed version history.

Since the blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. editor was first merged into wordpress/wordpress-develop (leading up to the WordPress 5.0 release), there has always been a considerable amount of manual work required to sync the necessary changes in the gutenberg GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the โ€˜pull requestโ€™ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/ repository into SVNSVN Subversion, the popular version control system (VCS) by the Apache project, used by WordPress to manage changes to its codebase.. During the early phases of the 7.0 release cycle, #64393 worked on making changes to the wordpress-develop build scripts with the goal of simplifying this process.

While the initial iteration of these changes committed in [61438] removed some of that manual friction, specific parts of the change disrupted a few important contributor workflows due to the way that PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher files were removed from version controlversion control A version control system keeps track of the source code and revisions to the source code. WordPress uses Subversion (SVN) for version control, with Git mirrors for most repositories. and added to the .gitignore file. These particular PHP files were shared in both repositories, and the idea of removing them was to ensure that the source of truth remains clearly in the GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses โ€˜blocksโ€™ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ repository. Instead of existing in both repositories, a script would create the files in the working copy of the wordpress/wordpress-develop repo.

What went wrong?

Unfortunately, there were a number of unanticipated side-effects of this change:

  • A number of existing integrations started failing where the build script was not run due to the fact that WordPress calls require directly on these files to load them. This included the distributed hosting tests.
  • Several files that were previously minified by the build script no longer were (see #65007, #64909)
  • While the source of truth of these files lives in Gutenberg, itโ€™s valuable to know when the updates were brought into CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. and what those updates were. Development in the Gutenberg pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. runs at a different pace than in Core, which means that diagnosing changes to these files from the Gutenberg side is considerably more difficult and time-consuming than when there are changes in version control, which provide pins for when defects are introduced or resolved.
  • Technically, there was a dual source of truth for these files before the change. The ultimate copies which made it into a WordPress release were those which had been committed into SVN, while the Gutenberg plugin might ship changed or updated files. After the change, that โ€œultimateโ€ copy no longer existed in SVN, except in the final release bundles. The โ€œsource of truthโ€ for the files in both contexts (WordPress and the Gutenberg plugin) lived solely in Gutenberg, but might actually be different from each other due to the new commit hash pinning in wordpress-develop.
  • Because these files were removed and the change added this new requirement to run the build step, major delays were introduced to any workflow which steps through commits. Even after a series of optimizations, this added over nine hours of runtime just to walk the 800+ commits from 6.8.5 to 6.9.0.
  • Version history for these files was severed in the change, making it suddenly look like the files were never part of the repository. Any attempts to review the history required custom git commands not usually available in IDEs or GitHubโ€™s UIUI User interface.
  • Files that were removed from version control were abandoned on the build server, which did not clean up properly. This resulted in removed files persisting and being included unintentionally in the betaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. and RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). versions (see #64716 and #65418).
  • While it happens from time to time that someone accidentally updates the code in one of these files in the Core repository instead of in Gutenberg where it should be done, the .gitignore directives hide any of those accidental changes, frustrating an already confusing situation. All git-based tooling (IDEs, git, git GUIs, linters, etcโ€ฆ) is unable to see or revert changes to these files, giving a false sense of safety when someone checks in code that will unexpectedly fail once running on a different computer.

What was resolved?

Two fundamental problems needed to be resolved:

  • Files that are required by WordPressโ€™ boot sequence needed to be restored.
  • The version history continuity for these files would ideally need to restored.

On one hand, reverting the original change would have been an easy way to restore the missing files. But doing so would make it appear as though the revert commit was introducing brand new files with the same name as the ones which had been deleted, rather than restoring the deleted files. The history before January 5 would have remained lost. A revert or a new commit which copies the files back remained an easy option, but something else was worth pursuing: restore the files with their history.

The chosen resolution was to create a branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch". of the code from the revision just before [61438], restore all of the files which were removed, and then perform a merge of the branch back into trunk to reconnect the version history. Until this point, creating branches was normal in the WordPress codebase for each release, but none had been reintegrated into trunk through a merge.

The merge commit provided an opportunity to restore the file contents and connect them to their history. While the original plan was to create a branch with a single commit (the merge commit itself) @desrosj had the suggestion that it would be valuable if the intervening history of changes could also be represented. In other words, to create the restore branch as an effective revert of the decision to remove all these files, not just the file objects themselves.

The result is that the restore branch contains a sequence of commits, where each is associated with a Gutenberg-sync commit in the upstream trunk branch. These commits modify the deleted files and introduce new files that would have been added had it not been for the .gitignore and svn:ignore changes. This is tantamount to checking out trunk at each Gutenberg sync commit, reverting the .gitignore changes, running npm run build:dev, and then adding the no-longer-ignored files (but the details are more complicated than this).

After the final merge, itโ€™s now possible to examine one of the affected files and immediately know at which Gutenberg sync commit it changed and how. Supposing someone discovered that an issue appeared within the first quarter of 2026, this additional granularity might save the need to scan through hundreds of commits when debugging.

What was the process for the resolution?

The original change itself serves as a cautionary guide on how far-reaching the effects can be for fundamental changes to WordPressโ€™ development infrastructure. Because no restoration-merge had ever occurred, it was worth performing full diligence to prevent similar blowback while trying to fix the repository.

The approach was discussed early on and remained open for a long time to allow for rarer implications to surface โ€” many did. The topic was brought up in Trac, in the #core channel in SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/, and during weekly Developer Chats in #core. The solution was brought to the attention of the systems team for their input, and as much as was possible, the restore was simulated at every stage to catch any failures which could be reasonably anticipated โ€“ many were.

git is a more powerful companion in situations like this than svn is, but ultimately all of WordPressโ€™ code must begin its life in svn. Therefore, a script was created to prototype a resolution in git to produce the desired outcome in a way that could be tested in local checkouts as well as run the test suite. The goalpost for this test branch was that, if done correctly, in the merge with trunk inside of its PR, there would be no follow-up commits from the bot that runs the build command (because no files would be changed through the build). The simulation script made it easy to adjust strategies and add missing steps once certain problems surfaced. One such problem was that some files didnโ€™t make it at the right time into one of the grunt lists when it should have; this could have involved a lot of manual work, but it didnโ€™t because of the script. The script still involved a lot of effort, but as many times as it ran, rebuilding the branch within a few minutes, it was clear that it was paying off.

Once the git branch was ready it was time to ensure that the steps in svn would actually produce that desired outcome once synchronized. For this, @abbe provided a test copy of the develop.wordpress.org Subversion repo that could be used to verify the flow. A second script stepped through each commit from the git branch and created mirrored commits on the svn side, then performed a merge into the test repoโ€™s trunk branch. The goalpost for this side was that the end result matched identically to the final exploratory git branch. In the end, it took fifteen full iterations of the simulated branch creation to get the expected result. Imagine finding out all of the little nuances only after deployingDeploy Launching code from a local development environment to the production web server, so that it's available to visitors. to production!

With all of the details then ready, it was go-time and time to deployDeploy Launching code from a local development environment to the production web server, so that it's available to visitors. for real. Sadly, not all aspects of the flow were testable beforehand, and problems did arise which stalled the restoration. The โ€œbuildโ€ server2 got stuck while processing commits due to a fatal Grunt error and @aidvu had to step in and manually clear up the issues on that server. However, while delayed, all it took to reach the successful end was running the script once more. Thankfully, after preparing each commit and before pushing them, a pause step was built-in for manual review before committing to the commit, and this allowed coordination with systems (itโ€™s ideal to build natural throttles in to automation to avoid billions of errors per second).

What is important to understand about this merge?

When working with merged branches, git automatically represents commits from all of the branches in history, but svn doesnโ€™t. This means that git-based workflows should be working without any trouble. But for those working in svn, a basic svn log will not show the corresponding sync-commits from the branch. One has to run svn -g log to see them. Any svn-based tooling will therefore hide the commits by default.

There is one solvable nuance that was cut from scope for this resolution: commit authors and timestamps. While it was demonstrated to be technically possible to match the sync commits with their associated commits in the upstream trunk branch, this would have required rewriting metadata in svn after making the commits, and there was no certainty that this wouldnโ€™t interrupt the git-svn sync. Therefore, while each sync-commit matches another commit from January 5 through March 26, each of the restore-branch sync-commits appears in a bunch on March 26. This is a minor issue; regrettable but acceptable given the sensitivity of the work done to bring the repository back into a proper state.

What still remains to be done?

A few issues arose during the restoration, some of which highlighted pre-existing problems.

  • The git and subversion โ€œignoresโ€ lists are incompatible and out of sync. These need to be harmonized and it would be ideal to have an automated process flag discrepancies before they are committed (#64971).
  • A number of files have been deleted from the git repository over time which were never removed from the subversion side. This leaves stale files in svn and on the build server. These need to be identified, removed, and added to the $_old_files array in wp-admin/includes/update-core.php (see #65418). Automated detection would be helpful here as well (see #64878).
  • The continued discrepancy between WordPress Coding StandardsWordPress Coding Standards The Accessibility, PHP, JavaScript, CSS, HTML, etc. coding standards as published in the WordPress Coding Standards Handbook. May also refer to The collection of PHP_CodeSniffer rules (sniffs) used to format and validate PHP code developed for WordPress according to the PHP coding standards. preferences between the Gutenberg and Core repositories remains an obstacle to harmony between the projects. Rulesets should be normalized or removed from the repositories so that accepted changes donโ€™t suddenly reject PRs when synchronizing. This issue also recently came up when restoring the WordPress documentation, as PHP code which was accepted in Gutenberg broke the docsโ€™ generation process once built in Core. This was due to the use of syntax forms which were already known to break tooling and integrations.
  • Functions and hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. maintained upstream in the gutenberg repository that are built from the new template files in the wp-build package lack proper PHP Docblockdocblock (phpdoc, xref, inline docs) comments. Mainly, action and filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. hooks had incorrectly formatted Docblocks (fixed in Gutenberg-78826), and missing @since tags (see Gutenberg-76727).

A few other unrelated issues persist as a result of the build change.

  • The workflow for developing simultaneously with the Core and Gutenberg repositories needs to be restored, as the traditional approach of mounting the Gutenberg plugin into the wp-content/plugins/ directory was severed in the change.

Thanks you!

A heartfelt โ€œthank youโ€ goes out to everyone who helped with overhauling the build script to reduce friction between the two code bases, and/or this effort to restore file history:

@4thhubbard, @762e5e74, @adamsilverstein, @aidvu, @amykamala, @bernhard-reiter, @dd32, @desrosj, @dmsnell, @ellatrix, @gaisma22, @isabel_brison, @johnbillion, @jonsurrell, @jorbin, @jorgefilipecosta, @jsnajdr, @jtquip88, @mamaduka, @manhar, @manzoorwanijk, @mcsf, @mywp459, @ntsekouras, @peterwilsoncc, @sabernhardt, @SirLouen, @swissspidy, @tobiasbg, @tyxla, @westonruter, @wildworks, and @youknowriad.

Timeline

  • January 5 โ€” The change was committed.
  • January 6 โ€” The first set of problems was reported.
  • February 23 โ€” An initial git branch was proposed which restored the files in their final state.
  • March 6 โ€” The restore branch was created in Subversion, and successfully synchronized to git.
  • March 18 โ€” An expanded git branch contained a commit for every associated Gutenberg sync commit in Core.
  • March 24 โ€” Systems provided a test svn repository from a backup of develop.svn.wordpress.org where a final merge could be tested before being applied to the production repository.
  • March 26 โ€” The branch was merged into Core, restoring the files and their change history.

Props to @amykamala and @desrosj who reviewed this post before publishing.

  1. The wordpress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ build server checks out each commit to the wordpress-develop SVN repository, runs npm install, npm run build, and then commits any changes to the build directory to the core.svn.wordpress.org repository. All release packages are created from this repository. โ†ฉ๏ธŽ

#build-test-tools, #git, #post-mortem, #svn

Default git branch for wordpress/wordpress-develop

Last year the decision was made to move the default branches for official WordPress GitHub repositories from master to trunk. The necessary systems work for the svn to git sync has been completed and as of today, https://github.com/WordPress/wordpress-develop and git://develop.git.wordpress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org// have been updated to reflect the new default branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch"..

If you have a local checkout, you can take the following steps to update the default branch

$ git checkout master
$ git branch -m master trunk
$ git fetch
$ git branch --unset-upstream
$ git branch -u origin/trunk
$ git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/trunk

Please note that https://github.com/wordpress/wordpress and git://core.git.wordpress.org/ along with a few others on github have not been updated yet. This post will be updated when that move is complete.

Thanks to @desrosj for reviewing this post.

#git, #github

Proposal: Update all git repositories to use `trunk` instead of `master`

The WordPress open sourceOpen Source Open Source denotes software for which the original source code is made freely available and may be redistributed and modified. Open Source **must be** delivered via a licensing model, see GPL. community cares about diversity. We strive to maintain a welcoming environment where everyone can feel included, by keeping communication free of discrimination, incitement to violence, promotion of hate, and unwelcoming behavior.

WordPress Etiquette

As a part of tearing down the systems of oppression that exist in the world, WordPress should remove references toย masterย and replace them withย trunk in all git repositories.

Master as the primary branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch". in git has its roots in BitKeeper which explicitly used it to mean master/slave relationships. Master/Slave is terminology rooted in oppression.

This may require updates to scripts so everything continues to function correctly. For things on GithubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the โ€˜pull requestโ€™ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/, there is a tool worth exploring to help with this:ย https://github.com/liyanchang/default-branch-migration

WordPress would not be alone in working to remove master/slave terminology. Github is changing the default, popular plugins such as Jetpack are updating and open source projects like Drupal and Python have already made this change. This is also in line with the work to eliminate whitelist/blacklist from the Core codebase.

This is a small move, but if it makes one more person comfortable contributing to a WordPress project, it will be worth it.

EDIT: This proposal originally suggested using main, I have modified it to use trunk based on feedback.

Props @desrosj and @jeffpaul for pre-publication feedback

#git, #github

On WordPress + Git

Can you believe it โ€“ weโ€™ve made it through a State of the WordState of the Word This is the annual report given by Matt Mullenweg, founder of WordPress at WordCamp US. It looks at what weโ€™ve done, what weโ€™re doing, and the future of WordPress. https://wordpress.tv/tag/state-of-the-word/. without anybody asking โ€œwhen is WordPress moving to GitGit Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. Most modern plugin and theme development is being done with this version control system. https://git-scm.com//GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the โ€˜pull requestโ€™ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/?โ€ You may, however, have caught a brief mention of issue trackers in relation to the Triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. Team focus for 2019. While itโ€™s very important to make the distinction between Git the version controlversion control A version control system keeps track of the source code and revisions to the source code. WordPress uses Subversion (SVN) for version control, with Git mirrors for most repositories. system (VCS) and GitHub the service, as the answer usually goes, itโ€™s understandably a continued area of interest. Many parts of WordPress have been developed using GitHub as the central tool, along with countless plugins and themes and even the WordPress book.

Hereโ€™s the tl;dr (but you should definitely keep reading after this): Changing things up doesnโ€™t just mean โ€œletโ€™s make the GitHub mirror at WordPress/wordpress-develop the canonical and migrate TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets overโ€ โ€“ it means imagining what kind of change would be a net benefit to the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. development process and eventually the entire .org ecosystem, and then finding the right tools to do it.

To that end, there is a group of people including myself (@helen), @desrosj, and @omarreiss who have been and will continue to be doing more coordinated research and planning around tooling. There is no current planned timeline nor is this a priority on top of the projects already enumerated for 2019, but any potential tooling change is being evaluated as it potentially relates to those projects, especially if it can better support phase 2 of GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses โ€˜blocksโ€™ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ development and the Triage Team.

This is not about chasing the latest and greatest or evangelizing a preference โ€“ itโ€™s important to identify the goals we have for the project and what pain points we are experiencing. More specifically than โ€œdemocratizing publishingโ€, in the core development process we should be aiming for diverse participation, a faster-but-steady pace of development, predictable and timely feedback cycles, and continuing to build user trust among users of all types. Recent pain points have been merges between branches (especially 5.0 back to trunktrunk A directory in Subversion containing the latest development code in preparation for the next major release cycle. If you are running "trunk", then you are on the latest revision.), JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a userโ€™s browser. https://www.javascript.com package updating, and continued participation when projects move from plugins and GitHub into core and Trac.

Roughly, here are some early thoughts on various moving pieces and potential future improvements.

Repositories and Workflows

  • SVNSVN Subversion, the popular version control system (VCS) by the Apache project, used by WordPress to manage changes to its codebase. repositories would need to remain, essentially flipping the mirroring process to go from Git -> SVN, making SVN (and Git) repos on .org read-only
  • Should the core build process continue to be handled as-is or should we move to something like Travis?
  • Integration of more automated testing โ€“ visual regressionregression A software bug that breaks or degrades something that previously worked. Regressions are often treated as critical bugs or blockers. Recent regressions may be given higher priorities. A "3.6 regression" would be a bug in 3.6 that worked as intended in 3.5., end-to-end, accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both โ€œdirect accessโ€ (i.e. unassisted) and โ€œindirect accessโ€ meaning compatibility with a personโ€™s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility), performance
  • Identification of the ideal lifecycle of an issue and process for a pull/merge request โ€“ design, docs, review, testing, etc.
  • Identification of contribution workflows (contributor documentation, Git branching methodology, etc.)
  • Security tracking and releasing

Issue Tracker

  • Critical for a Triage Team to review existing issues and to remain active going forward
  • Potential for the bulk triage process to include migrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. from Trac to another tracker
  • Any issue migration should be determine on a case by case basis by the Triage Team in collaboration with component maintainers; the most automation that should happen is a tool that takes a list of Trac tickets and imports them elsewhere
  • Issue import process needs to take commenter attribution into account
  • Trac would remain in a read-only state
  • How are reports generated and used (i.e. is the built-in filtering capabilitycapability Aย capabilityย is permission to perform one or more types of task. Checking if a user has a capability is performed by the current_user_can function. Each user of a WordPress site might have some permissions but not others, depending on theirย role. For example, users who have the Author role usually have permission to edit their own posts (the โ€œedit_postsโ€ capability), but not permission to edit other usersโ€™ posts (the โ€œedit_others_postsโ€ capability). enough in a given tool or will we need something more robust to support workflows)
  • Is the issue tracker still the best place for feature requests?
  • Implementation of issue templates
  • Identifying existing custom integrations and whether those problems still exist and still need to be solved after a move

Broader Ecosystem (later / bigger question mark)

  • Connectors from GitHub to .org pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. and theme repos (GitHub Actions-powered build+deployDeploy Launching code from a local development environment to the production web server, so that it's available to visitors.)
  • Automated testing โ€“ sniffers, Tide, unit tests, WP and PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher compat testing, Theme Check
  • Aligning plugin and theme review teams

#git, #trac, #triage

Git mirrors for WordPress

Iโ€™m pleased to share we now have an official GitGit Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. Most modern plugin and theme development is being done with this version control system. https://git-scm.com/ mirror for the WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. development SVNSVN Subversion, the popular version control system (VCS) by the Apache project, used by WordPress to manage changes to its codebase. repository.

git clone git://develop.git.wordpress.org/

Read-only mirrors are also set up for a few other WordPress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ repositories, including BuddyPress, bbPressbbPress Free, open source software built on top of WordPress for easily creating forums on sites. https://bbpress.org, and the old core.svn โ€œbuildโ€ repository:

git clone git://buddypress.git.wordpress.org/
git clone git://bbpress.git.wordpress.org/
git clone git://core.git.wordpress.org/
git clone git://glotpress.git.wordpress.org/

Make sure you use the git protocol (not httpHTTP HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands.) and include the trailing slash.

Can you use develop.git.wordpress.org for core development? Yes! For all practical purposes, the SVN and Git repositories are now equals. Pick your poison; use whatever youโ€™d like for all your development and deployment needs.

For creating patches:ย If youโ€™re into the command line, simply use git diff โ€” to be specific, git diff --no-prefix is ideal. This format is easily applied with patch, just like SVN diffs. For more, check out scribuโ€™s post on contributing using git. Might also be a good time to plug grunt-patch-wordpress, a work in progress โ€” help make it awesome, if you can.

With this mirror, weโ€™ve applied some lessons we learned from previous experiences:

  • Tags for major releases receive an extra .0 (โ€œ3.8.0โ€, not โ€œ3.8โ€), making them compatible with tools requiring semver-like version numbers, and allowing branches to have their own namespace (โ€œ3.8โ€, not โ€œ3.8-branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch".โ€).
  • Committercommitter A developer with commit access. WordPress has five lead developers and four permanent core developers with commit access. Additionally, the project usually has a few guest or component committers - a developer receiving commit access, generally for a single release cycle (sometimes renewed) and/or for a specific component. data is pulled from WordPress.org.
  • The SSLSSL Secure Sockets Layer. Provides a secure means of sending data over the internet. Used for authenticated and private actions. versions of the SVN repositories are used.

Note that these Git repositories have different hashes than anything currently mirrored on GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the โ€˜pull requestโ€™ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/. We never did break these hashes as promised a year ago. Next steps will be to figure out how to best mirror these to GitHub (and replace whatโ€™s there), which is complicated by now having old and new repositories for core development. Additionally, Iโ€™m sure weโ€™ll find at least one glitch in this in a matter of a few days, so consider the next week or so a betaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. test.

Edit: Well, I mentioned the next week would be a beta test. We found an error (that didnโ€™t take long) in how authors got synced over, so weโ€™ll be breaking the hashes tonight.

There are a lot of other repositories on WordPress.org not yet mirrored. Notably: plugins and themes. These are massive multi-project repositories and will require a bit more investment.

#git

Git Mirror History Breakage

A few years ago, I started publishing a mirror of WordPress on GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the โ€˜pull requestโ€™ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/. It was subsequently promoted to WordPress/WordPress. What I neglected to do, however, was provide an appropriate authors.txt file, until recently. That means that earlier commits are attributed to dummy e-mail addresses and as such cannot be associated with user accounts on GitHub. Considering the recent introduction of contributions on GitHub, this seems a shame. Also, if we were to move to GitGit Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. Most modern plugin and theme development is being done with this version control system. https://git-scm.com/ in the future, we would probably want our official mirror to have the best possible data.

Proposed

That we re-run the git-svn import with a proper authors.txt file.

Upsides

Weโ€™ll have a proper Git mirror with good and consistent author data, that we can, if desired, use for a future migrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. to Git. Commits will be properly attributed in GitHub.

Downsides

This will break Git history. If you have a Git checkout of WordPress, either standalone or in a submodule, thatโ€™ll mean that youโ€™ll have to rebase your master branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch". off of origin (or even better, blow the whole thing away and re-clone).

So: thoughts? Would this ruin your day?

#git, #github

For forking pleasure: http://github.com/…

For forking pleasure: http://github.com/wordpress/

#git, #github