镜像git分支到svn repo

Zir*_*kos 0 svn git version-control git-svn bitbucket-server

我正在寻找一种方法来设置现有的git存储库(从Atlassian存储上托管的中央存储库克隆),以便从specfic分支的更改同步到SVN存储库上的路径.我对从SVN获取更改或同步分支和标记不是特别感兴趣; 我只想拥有一个SVN"镜像"我的一个分支.

在阅读git-svn手册页和其他各种来源后,我得到了使用git svn init设置svn repo,但是它会拒绝提交任何内容:

$ git --version
git version 1.9.5.msysgit.0
$ git clone ssh://git@stash-server.mydomain.com:4321/myproject/playground.git
Cloning into 'playground'...
$ cd playground
$ svn mkdir --parents https://svn-server.mydomain.com:5432/svn/playground/trunk -m "Importing git repo" 
Committed revision 15900.
$ git svn init https://svn-server.mydomain.com:5432/svn/playground/trunk
$ git svn fetch
W: Ignoring error from SVN, path probably does not exist: (175007): HTTP Path Not Found: REPORT request failed on '/svn/145273/!svn/bc/100/playground/trunk': '/svn/145273/!svn/bc/100/playground/trunk' path not found
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories
r15900 = 1ad941791edb06c4df8281cd31e69ce5d508e728 (refs/remotes/git-svn)
$ git svn dcommit
Unable to determine upstream SVN information from HEAD history.
Perhaps the repository is empty. at C:\Program Files (x86)\Git/libexec/git-core\git-svn line 856.
Run Code Online (Sandbox Code Playgroud)

"也许存储库是空的" - >当然是,我正在尝试将git分支"克隆"到svn中.知道我在这里做错了吗?

Rog*_*Rog 5

您可能想要查看SubGit及其Atlassian Stash的附加组件.在转换过程中,它会巧妙地将Git镜像到SVN.

披露:我为Atlassian工作