提交本地git repo到svn

时间:2018-10-11 12:16:50

标签: git svn version-control

我当前的项目中有一个本地git回购。现在,我要使用git svn工具,将git repo提交到SVN repo。

我已经阅读了这篇文章:pushing an existing git reposotory to svn,但就我而言,它不起作用。

我尝试过的事情:

/Documents/Workspace (master)
$ git status
On branch master
nothing to commit, working tree clean

因为我在Windows上,所以在svn存储库中创建了一个新文件夹,并将其签出到

/documents/Workspace

/Documents/Workspace (master)
$ ls
.git
Current-Project/
.svn

直到现在git repo和svn repo都在同一个文件夹中。

我认为,从上面的帖子来看,步骤1和2到目前为止已经完成

  
      
  1. cd / path / to / git / localrepo
  2.   
  3. svn mkdir --parents协议:/// path / to / repo / PROJECT / trunk -m“导入git repo”
  4.   
  5. git svn初始化协议:/// path / to / repo / PROJECT -s
  6.   
  7. git svn获取
  8.   
  9. git rebase原始/中继   5.1。 git状态   5.2。 git add(冲突文件)   5.3。 git rebase-继续   5.4。 (重复5.1。)
  10.   
  11. git svn dcommit
  12.   

第3、4、5步已完成(在第4步中,没有索引,因为它是一个空文件夹)

但是git svn dcommit给我以下错误:

/Documents/Workspace (master)
$ git svn dcommit
Unable to determine upstream SVN information from HEAD history.
Perhaps the repository is empty. at C:/Users/benjaminulrich/AppData/Local/Programs/Git/mingw64/libexec/git-core\git-svn line 913.

看不清为什么它不起作用,有人可以帮忙吗?

0 个答案:

没有答案