I have a WordPress plugin in a Git repository: https://github.com/pushpad/pushpad-wordpress
I would like to continue to use git for development. However I have to publish a copy to SVN in order to publish the plugin on WordPress.org:
https://plugins.svn.wordpress.org/pushpad-web-push-notifications/
I’m looking for the easiest solution possibile. The SVN repository is empty. I cannot use git svn clone
because I don’t want to create a new git repo.
I would like to simply push the git master branch to SVN trunk. How can I do that?
I’ve tried adding the following code to .git/config
[svn-remote "svn"]
url = https://plugins.svn.wordpress.org
fetch = pushpad-web-push-notifications/trunk:refs/remotes/trunk
branches = pushpad-web-push-notifications/branches/*:refs/remotes/*
tags = pushpad-web-push-notifications/tags/*:refs/remotes/tags/*
However when I run git svn fetch svn
git starts searching millions of revisions which refer to all the plugins hosted by WordPress.org. So I have to kill that command. Also git branch -a
doesn’t show any new branch for svn. So I don’t know how to proceed.
there u go.
the code in the git config for the svn remote should then be something similar to this:
that remote is automatically added once you execute git svn init, the url has to be complete, not just the server root
You have to execute:
Where
-r540813
is your first revision andhttps://plugins.svn.wordpress.org/wp-agenda/
is a example of a plugin SVN repository at WordPressTo get the first revision number, you can use:
And the first revision number will be displayed in the last commit on the console output