我在Git库中有一个Wordpress插件:https://github.com/pushpad/pushpad-wordpress
我想继续使用git进行开发。但是,为了在Wordpress.org:https://plugins.svn.wordpress.org/pushpad-web-push-notifications/上发布插件,我必须将副本发布到SVN
我在寻找可能的最简单的解决方案。SVN存储库为空。我不能使用git svn clone,因为我不想创建一个新的git存储库。
我想简单地将git主分支推送到SVN主干。我该怎么做呢?
我尝试将以下代码添加到.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/*然而,当我运行git时,git svn fetch svn开始搜索数百万个修订版本,这些修订引用了Wordpress.org托管的所有插件。所以我必须终止这个命令。此外,git branch -a没有显示svn的任何新分支。所以我不知道该怎么做。
发布于 2016-05-19 19:59:49
这就对了。
git svn init <linkToRepositoryOrFolder>
git svn dcommit然后,svn remote的git配置中的代码应该类似于:
[svn-remote "svn"]
url = http://mySVN/wordpresspluginrepository
fetch = :refs/remotes/git-svn一旦执行git svn init,就会自动添加该远程服务器,url必须完整,而不仅仅是服务器根目录。
发布于 2016-06-16 09:47:38
您必须执行以下命令:
git svn clone -r540813:HEAD -s --no-minimize-url https://plugins.svn.wordpress.org/wp-agenda/其中-r540813是您的第一个修订版,https://plugins.svn.wordpress.org/wp-agenda/是Wordpress的插件SVN存储库的一个示例
要获取第一个修订号,您可以使用:
git svn log https://plugins.svn.wordpress.org/wp-agenda/并且第一个修订号将显示在控制台输出的最后一次提交中
https://stackoverflow.com/questions/37168418
复制相似问题