我想学习使用git-svn
。我有我的硬盘上一个SVN本地资源库,我已经签出前一阵子使用这样的事情:如何克隆一个git回购从本地svn的
svn co http://myserver.com/mysvnrepo/trunk/ /mysvnrepo/
ls -a /mysvnrepo/
. .. .svn foo bar
这/mysvnrepo/
是巨大的,所以我想,以避免重新下载或不惜一切代价复制文件。
我不知道是否有一种方法来git clone
这个本地回购,而无需下载/复制任何东西(因为它已经存在)。
我有this这似乎正是我要找的,但是当我做,它并没有完全放弃我什么,我期待。
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
为“版本和最新的最新的”。
根据docs似乎我需要使用git svn init
,因为git svn clone
运行fetch
,我当然不想要。所以我试了
git svn init --trunk=file:///mysvnrepo/
......但没有运气。
我完全新的git
,所以我的困惑是现成的,图表......我做得完全错误的?
在此先感谢
谢谢andygavin ......我也了解这一点,这是我能做的最好的,但可悲的是它还是重新下载的所有文件,这正是我想避免这样做。 – OLL