SVN repo克隆到Git repo工作正常.
但是我有问题
java -Dfile.encoding=utf-8 -jar c:\svn-migration-scripts.jar clean-git --force
Run Code Online (Sandbox Code Playgroud)
上面列出的命令应该将所有遥控器标签转换为本地标签.
但我接受:
# Creating annotated tags...
tag has diverged: 1.0_RC1
Creating annotated tag '1.0_RC1' at refs/remotes/tags/1.0_RC1.
# Creating local branches...
# Checking for obsolete tags...
svn: E215004: Authentication failed and interactive prompting is disabled; see t
he --force-interactive option
svn: E215004: Unable to connect to a repository at URL 'http://127.0.0.1/svn/dri
veLearner/tags'
svn: E215004: No more credentials or we tried too many times.
Authentication failed
Deleting Git tag '1.0_RC1' not in Subversion.
Deleted tag '1.0_RC1' (was d200bf6)
# Checking for obsolete branches...
svn: E215004: Authentication failed and interactive prompting is disabled; see t
he --force-interactive option
svn: E215004: Unable to connect to a repository at URL 'http://127.0.0.1/svn/dri
veLearner/branches'
svn: E215004: No more credentials or we tried too many times.
Authentication failed
No obsolete branches to remove.
# Cleaning tag names
# Cleaning branch names
Run Code Online (Sandbox Code Playgroud)
我使用本地winXP,java 1.7_65,VisualSVN Server(http,端口80).在读/写模式下,每个人都可以使用Repo.
有趣的是,我已经完成了这个过程,但在相同的问题后成功地在其他回购,但我不知道我做了什么.
有人解决一下吗?
来自Atlassian的svn-migration-script.java是一个废话.以下是如何使用最少的第三方软件并使用保留本地分支和标记从SVN迁移到Git的详细说明.
详细补习:http://www.sailmaker.co.uk/blog/2013/05/05/migrating-from-svn-to-git-preserving-branches-and-tags-3/
SVN服务器:
url:[svn_address ]/[project_name]/[project_name]
user:[user]
pass:[pass]
(访问用户[user]:rw)
target:
c:[eclipse_workspace] [project_name](如果不存在则创建目录)
过程:
++在你的系统中安装svn和git(使用Git Bash)(可选择将他们的'bin'目录添加到PATH)
++确保svn serwer在http模式下运行(不在https中)
++必要时make authors.txt
++克隆svn到git:git svn clone --stdlayout --authors-file=c:\authors.txt
[svn_address]/[project_name] c:[eclipse_workspace] [project_name] [user] [pass]
命令rebase -b 0x64000000 "c:\program files\git\bin\libsvn_repos-1-0.dll"(或类比)如果出现一些带映射的错误可能很有用
++从上下文菜单中运行Git Bash(你应该安装这个)
++类型git branch -a来检查你的分支和标签
++在Git Bash中输入:
附加分支:
for branch in `git branch -r | grep "branches/" | sed 's/ branches\///'`; do
git branch $branch remotes/branches/$branch
done
Run Code Online (Sandbox Code Playgroud)
附加标签:
for tag in `git branch -r | grep "tags/" | sed 's/ tags\///'`; do
git tag $tag remotes/tags/$tag
done
Run Code Online (Sandbox Code Playgroud)
++创建裸git存储库并推送[project](你将松散SVN依赖项)
++ clone [project]到目标位置