来自现有自定义 SVN 的 git-svn 文件夹

nga*_*ull 5 git git-svn msysgit

我想使用 git-svn 来处理具有以下结构的现有 SVN 存储库:

http://thesvn/project
  branch1
  branch2
  ...
Run Code Online (Sandbox Code Playgroud)

我无法配置 svn remote 以正确获取分支。目前我有这个配置:

[svn-remote "svn"]
    url = http://thesvn/project
    branches = *:refs/remotes/branches/*
Run Code Online (Sandbox Code Playgroud)

当我尝试时git svn fetch svn,我得到以下信息:

ref: 'refs/remotes/' ends with a trailing slash; this is not permitted by git or Subversion
Run Code Online (Sandbox Code Playgroud)

请注意,我正在使用 msysgit 在 Windows 上工作。有什么建议吗?

Myk*_*rov 0

您是否尝试过 git-svn 的 init 或 clone ,例如git svn clone -bproject http://thesvn/ project?你会在你的 git 配置中得到类似这样的东西:

[svn-remote "svn"]
url = http://thesvn/
branches = project/*:refs/remotes/*
Run Code Online (Sandbox Code Playgroud)

这应该有效。