我想学习使用git-svn
。我的磁盘上有一个 svn 本地存储库,不久前我使用类似这样的东西检查过它:
svn co http://myserver.com/mysvnrepo/trunk/ /mysvnrepo/
ls -a /mysvnrepo/
. .. .svn foo bar
这/mysvnrepo/
是巨大的,所以我想不惜一切代价避免重新下载或复制文件。
我想知道是否有办法在git clone
不下载/复制任何内容的情况下访问此本地存储库(因为它已经存在)。
我有这个似乎是我正在寻找的东西,但是当我这样做时,它并不能完全满足我的期望。
cd /mysvnrepo/
git svn clone file://mysvnrepo/
ls /mysvnrepo/
. .. .git .svn foo bar
git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .svn/
# foo/
# bar/
我希望git
检测到foo
并bar
作为“版本化和最新”。
根据文档,我似乎需要使用git svn init
,因为git svn clone
运行 a fetch
,我当然不想要。所以我尝试了
git svn init --trunk=file:///mysvnrepo/
...但没有运气。
我对 完全陌生git
,所以我的困惑是超乎寻常的……我做错了什么吗?
提前致谢