Git mirrors for WordPress
I’m pleased to share we now have an official Git mirror for the WordPress core development SVN repository.
git clone git://develop.git.wordpress.org/
Read-only mirrors are also set up for a few other WordPress.org repositories, including BuddyPress, bbPress, 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 http) 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-branch”).
- Committer data is pulled from WordPress.org.
- The SSL versions of the SVN repositories are used.
Note that these Git repositories have different hashes than anything currently mirrored on GitHub. 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 beta 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.
Amy Hendrix (sabreuse) 6:51 pm on January 15, 2014 Permalink | Log in to Reply
w00t!!
Boone Gorges 6:52 pm on January 15, 2014 Permalink | Log in to Reply
OMG. git-svn, I will not miss you. Thanks @nacin!
Andrew Nacin 6:56 pm on January 15, 2014 Permalink | Log in to Reply
To clarify, as I think I chopped out an sentence when editing this: It’s still a read-only mirror. “For all practical purposes” was meant to apply to everyone but committers. So for the committers to these repos that want to use Git, you’ll still need to use git-svn, for the moment.
Boone Gorges 6:58 pm on January 15, 2014 Permalink | Log in to Reply
Ha, I’d just reopened the page to ask about this. Still a huge win.
Travis Northcutt 6:52 pm on January 15, 2014 Permalink | Log in to Reply
Awesome!
Ionel Roiban 6:53 pm on January 15, 2014 Permalink | Log in to Reply
Great! How about an official repo on Github?
Andrew Nacin 6:58 pm on January 15, 2014 Permalink | Log in to Reply
We’ve had an official mirror there for a long while now. But this is subject to some changes; see the second-to-last paragraph in this post.
Ionel Roiban 7:20 pm on January 15, 2014 Permalink | Log in to Reply
Thank you. I did actually have that Github repo watched but its description makes it clear that it is just a mirror (from svn) and not a place where anyone can submit their contributions to. What’s the plan on accepting pull request directly on Github, if any?
Andrew Nacin 7:25 pm on January 15, 2014 Permalink | Log in to Reply
I’ve been studying how some other projects do or don’t do this. Something to discuss in a few months, I imagine.
Weston Ruter 11:12 pm on January 15, 2014 Permalink
@nacin yeah, it is amazing to see that Symfony2 recently (and rightfully) boasted about having over 10,000 pull requests on their GitHub repo: https://github.com/symfony/symfony/pulls
I can’t imagine how many Core pull requests would come in if WordPress accepted them on GitHub.
Mike Schinkel 8:18 pm on January 19, 2014 Permalink
@Weston – LOL. Too many pull requests might be a “be careful what you wish for” concern than that the core team might want to avoid!
deltafactory 6:54 pm on January 15, 2014 Permalink | Log in to Reply
Please excuse me if this had been answered previously:
What’s the roadmap, if any, for deprecating SVN for core development and/or plugins?
Andrew Nacin 7:04 pm on January 15, 2014 Permalink | Log in to Reply
If you or your tools want to use Git, you should be able to. If you or your tools want to use SVN, you should be able to. You could think of it as a desire to be VCS agnostic. Whether one commits to SVN or pushes to Git is ideally a decision that should rest with individual plugin developers. Or for the case of these repos, the group of committers. When the infrastructure is there for this, of course.
Thomas van der Beek 6:57 pm on January 15, 2014 Permalink | Log in to Reply
Yippie-kai-yay! Can’t wait for plugins and themes repo’s!
Drew Jaynes 6:58 pm on January 15, 2014 Permalink | Log in to Reply
This is great news! If/when plugins and themes are mirrored over, it will be a huge boon as well. Thanks for all your work on rolling this out
Bryan Petty 7:12 pm on January 15, 2014 Permalink | Log in to Reply
For anyone that wasn’t currently aware, there has been a large on-going effort to do the same for plugins for the last year already, currently mirroring up to GitHub: Plugin Mirror
It’s still more of an experiment and utility than an officially supported workflow though.
Cor van Noorloos 7:20 pm on January 15, 2014 Permalink | Log in to Reply
Probably in too much of a hurry, but will
http://svn.automattic.com/wordpress-i18n/pot/trunk/
also receive its git mirror?Andrew Nacin 7:31 pm on January 15, 2014 Permalink | Log in to Reply
Good question. I wasn’t necessarily planning to have the i18n repository mirrored, given we’re trying to end our dependence on it (and that it’s a massive, multi-project, unusual repo). But I forgot about the POT directory. People still use that?
https://i18n.svn.wordpress.org/pot/trunk/ is the “canonical” URL for that, by the way.
Nashwan Doaqan 10:19 am on January 16, 2014 Permalink | Log in to Reply
We stil use the https://i18n.svn.wordpress.org/ar for the Arabic WordPress.. is this wrong?!
Andrew Nacin 7:24 pm on January 15, 2014 Permalink | Log in to Reply
The post makes clear that these operate over
git://
. The reason is this is simply being served using git-daemon. We’ll work on support for http-based communications in the future. If your organization blocks git and requires http or https, you can easily mirror this yourself for the moment (and stay tuned for these to be pushed to GitHub).Julien 7:30 pm on January 15, 2014 Permalink | Log in to Reply
Aaah so awesome! Thanks for making this happen !
Mike Schroder 7:44 pm on January 15, 2014 Permalink | Log in to Reply
Woohoo! I’d been waiting for this. Thanks muchly!
Andrew Nacin 7:49 pm on January 15, 2014 Permalink | Log in to Reply
So, I did mention 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.
Daniel Bachhuber 10:19 pm on January 15, 2014 Permalink | Log in to Reply
Just to clarify: this means github.com/WordPress/WordPress will be broken (or worse, incorrect) for everyone that’s added it as a submodule in their projects? Or am I missing something?
Andrew Nacin 10:34 pm on January 15, 2014 Permalink | Log in to Reply
Sorry, I meant the hashes of these git.wp.org repositories. We haven’t figured out what the plan will be for the GitHub repository yet. We already signed off on breaking those hashes in the past, but I don’t know how feasible that is. Options include moving wordpress/wordpress to wordpress/wordpress-build (and then optionally breaking the hashes and having it mirror core.git) and then adding a new wordpress/wordpress-develop for develop.git (one downside being the watchers and stars wouldn’t carry to the new “canonical” repo, but not a big deal). Suggestions welcome.
Daniel Bachhuber 10:42 pm on January 15, 2014 Permalink | Log in to Reply
Phew Glad I don’t have to work late tonight. I don’t have any good suggestions at the moment.
WebSharks 8:08 pm on January 15, 2014 Permalink | Log in to Reply
This is awesome! Hooray Can’t wait to see this extended to plugins/themes.
Gregory Cornelius 8:12 pm on January 15, 2014 Permalink | Log in to Reply
You made my day.
Stephen Edgar 9:04 pm on January 15, 2014 Permalink | Log in to Reply
Very Cool, Thanks.
Pippin Williamson 9:04 pm on January 15, 2014 Permalink | Log in to Reply
Fantastic!
Rafael Funchal 10:33 pm on January 15, 2014 Permalink | Log in to Reply
This is really awesome.
Nashwan Doaqan 10:21 am on January 16, 2014 Permalink | Log in to Reply
Coool!
Frank 4:36 pm on January 16, 2014 Permalink | Log in to Reply
Great to see, that WordPress opens for git.
Chuck Reynolds 5:20 am on January 17, 2014 Permalink | Log in to Reply
big step.. love it.
Eduardo Reveles 11:48 pm on January 17, 2014 Permalink | Log in to Reply
Nice!
avoryfaucette 10:35 am on January 18, 2014 Permalink | Log in to Reply
Omg so exciting! I’m really stoked to hear that WordPress is moving in the direction of fully supporting Git and maybe eventually GitHub.
I have a question that I hope isn’t too newbie for here. I understand the issues above with GitHub and I can handle using the command line. However, I’m new to open source contributions and would like to start with working on small WordPress bugs. I have a GitHub profile and have installed GitHub’s software to my Mac to keep track of my forks locally. So I have two questions:
1) For my local purposes, does this mean I could theoretically keep track of my own work in the GitHub software, even though I can’t actually use GibHub to submit patches? If yes, would I just follow scribu’s instructions through step 3 (make a feature branch) and then locally save the clone of the WordPress source files so my GitHub software can see it?
2) For “having things on my GitHub profile purposes,” once I’ve followed to command line steps to submit my patch, would I just use the usual process to send the patch to GitHub but not actually create a pull request?
Thanks for helping out a new contributor!
Andrew Nacin 11:02 pm on January 18, 2014 Permalink | Log in to Reply
Right, you can still create a feature branch, commit to that branch, and push that branch to your own fork on GitHub. You just would not actually create and send a pull request. Note that you can also get a patch from GitHub by adding “.diff” to the end of any commit URL.
Todd Lahman 1:08 am on January 25, 2014 Permalink | Log in to Reply
Looking forward to the day when the plugin repo is gitified.
Denis de Bernardy 6:22 am on January 31, 2014 Permalink | Log in to Reply
git clone git://buddypress.git.wordpress.org buddypress
Cloning into ‘buddypress’…
fatal: unable to connect to :
[0: ::1]: errno=Connection refused
[1: 127.0.0.1]: errno=Connection refused
Denis de Bernardy 6:25 am on January 31, 2014 Permalink | Log in to Reply
Also, when I clone the same using http, I get:
$ head readme.md
i.e. not the correct repo.
Andrew Nacin 6:26 am on January 31, 2014 Permalink | Log in to Reply
You need a trailing slash in addition to the git protocol.
Denis de Bernardy 9:14 am on January 31, 2014 Permalink | Log in to Reply
OK, that works. A redirect or a more meaningful error message would be welcome… As would making the http version of the repo serve the correct repo.
Andrew Nacin 9:17 am on January 31, 2014 Permalink | Log in to Reply
I’m not sure why the slash is needed, but based on the error I presumed it was at the git client level, not something on our end. I honestly have no idea.
The git protocol is served by the git daemon. The http protocol is served by gitolite, which was never actually deployed; I’ll get that turned off for now to alleviate confusion.
helgatheviking 3:13 pm on April 1, 2014 Permalink | Log in to Reply
I too am seeing the fatal error. I was able to clone ok, but now when I need to pull:
fatal: unable to connect to develop.git.wordpress.org:
develop.git.wordpress.org[0: 66.155.40.244]: errno=No error