我使用标签成功地将我的 SVN 存储库迁移到 Git 中git svn-clone
。但是,git svn-clone
不迁移svn:externals
。因此,我决定使用git filter-branch
.
对于svn:externals
,首先我为每个 svn:externals 创建了一个单独的 Git 存储库,然后我尝试使用以下内容,但它不起作用。
$ git filter-branch --tree-filter "git submodule add git@github.com:myAcc/mySubmodule.git mySubmodule" HEAD
Rewrite a013a219e4294d4ee66b323cf1db9c170d90130a (1/4)fatal: working tree '.' already exists.
Clone of 'git@github.com:myAcc/mySubmodule.git' into submodule path 'common' failed
tree filter failed: git submodule add git@github.com:myAcc/mySubmodule.git mySubmodule
rm: cannot remove `c:/myRepo/.git-rewrite/revs': Permission denied
rm: cannot remove directory `c:/myRepo/.git-rewrite': Directory not empty
知道如何做到这一点吗?提前非常感谢。