这个svn2git错误是什么意思? [英] What does this svn2git error mean?

查看:120
本文介绍了这个svn2git错误是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用svn2git将我的存储库从svn导入到git,但是当它碰到一个分支时似乎失败了。有什么问题?

I am trying to import my repository from svn to git using svn2git, but it seems like it's failing when it hits a branch. What's the problem?

Found possible branch point: https://s.aaa.com/repo/trunk/project => https://s.aaa.com/repo/branches/project-beta1.0, 128
Use of uninitialized value in substitution (s///) at /opt/local/libexec/git-core/git-svn line 1728.
Use of uninitialized value in concatenation (.) or string at /opt/local/libexec/git-core/git-svn line 1728.
refs/remotes/trunk: 'https://s.aaa.com/repo' not found in ''

Running command: git branch -l --no-color
* master
Running command: git branch -r --no-color
  trunk
Running command: git checkout trunk
Note: checking out 'trunk'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at f4e6268... Changing svn repository in cap files
Running command: git branch -D master
Deleted branch master (was f4e6268).
Running command: git checkout -f -b master
Switched to a new branch 'master'
Running command: git gc
Counting objects: 450, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (368/368), done.
Writing objects: 100% (450/450), done.
Total 450 (delta 63), reused 450 (delta 63)


推荐答案

我必须打开.git / config文件并删除svn-remote部分下的所有分支和标记条目,然后运行'git svn clone'命令以使此错误消失。显然,如果我多次运行这个命令(通常是停止并从修订版重新开始),分支/标记条目将被添加到配置文件中,而不是被重用,这会导致错误。

I had to open up the .git/config file and delete all the branches and tags entries under the svn-remote section and run the 'git svn clone' command for this error to go away. Apparently, if I run this command multiple times (usually stop and re-start from a revision), the branch/tag entries get added to the config file instead of being reused, which causes the error.

这篇关于这个svn2git错误是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆