我目前正在将一个 svn 源代码控制项目迁移到 Git (BitBucket) 中。我已按照Atlassian 的指南进行操作,几乎走到了尽头,但在运行命令git push -u origin --all时遇到以下错误:
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
Everything up-to-date.
我相信这是因为 SVN 布局不是标准布局。我不得不像这样指定主干、分支和标签:
git svn clone --trunk=/main --branches=/branches/Sprints/Iteration_1 --branches=/branches/Sprints/Iteration_2 --tags=/tags --authors-file=authors.txt svn://svn-project/projExample projExample
但我不知道如何继续并将回购推送到 BitBucket。任何帮助将不胜感激!
还值得注意的是,我尝试了命令git push origin master并收到以下错误:
error: src refspec master does not match any.
error: failed to push refs to '[my bitbucket origin]'.
我发现的上一个问题的一个例子是here。但这似乎没有帮助。也许我做错了什么?
以下是为了运行以获取上述初始错误的命令:
- java -jar /svn-migration-scripts.jar 验证
- java -jar /svn-migration-scripts.jar authors svn://svn-project/projExample > authors.txt
- 编辑 authors.txt 文件以匹配所有当前用户名和电子邮件。
- git svn clone --trunk=/main --branches=/branches/Sprints/Iteration_1 --branches=/branches/Sprints/Iteration_2 --tags=/tags --authors-file=authors.txt svn://svn-项目/projExample projExample
- java -DFile.encoding=utf-8 -jar /svn-migration-scripts.jar clean-git --force
- git svn 获取
- java -Dfile.encoding=utf-8 -jar /svn-migration-scripts.jar sync-rebase
- java -Dfile.encoding=utf-8 -jar /svn-migration-scripts.jar clean-git --force
- git 远程添加源https://example@bitbucket.com/projExample.git
- git push -u origin --all
- 什么都没发生。