git svn fetch - 无法找到 .git 目录

git svn fetch - Unable to find .git directory

我已使用以下 git svn clone 命令

将 SVN 存储库迁移到本地 Git 存储库
git svn clone <svn-repo>/<project> <git-repo-name>

现在我想在 SVN 存储库更改(新提交)时同步新的本地 Git 存储库。我使用以下命令从原始 SVN 存储库中获取任何新提交:

git svn fetch

但是执行上面的命令后什么也没有获取。它显示为:

$ git svn fetch

Instaed 它显示为:

$ git svn fetch
fatal: Not a git repository (or any of the parent directories): .git
Unable to find .git directory
at D:\Program Files\Git\mingw64/libexec/git-core\git-svn line 347.

我认为您需要将目录更改为 git 存储库的根目录。克隆操作将从当前文件夹中创建一个子文件夹,其中包含新的 git 存储库。 cd 进入此文件夹,然后尝试 svn fetch 操作。