为什么 git svn init 创建一个空存储库?
我正在尝试遵循 本指南 以便将项目从 svn 移动到 git。我并不特别关心合并上游的东西,所以这似乎是我探索过的最干净的解决方案。
我的问题是,当我执行 git svn init file:///Users/Ankur/path/to/repository --no-metadata 时,
我收到消息 Initialized empty Git repository in /Users /Ankur/path/to/repository/.git/
无论如何,它应该是输出的第一行,但后面应该是有关提交的单独消息。我没有得到任何其他东西(而且执行得很快)。
我已经通过使用同一存储库执行 svn co file:///Users/Ankur/path/to/repository 来验证我使用的路径是否正确,以确保我可以正常签出存储库。
有关我的系统的详细信息:Mac OS X 10.6.5,which git
返回/usr/bin/git
(我认为这意味着它是与 Xcode 一起安装的,因为我删除了该版本我用 git-osx-installer 认为它可能是最初的罪魁祸首)。 git --version
返回 git版本1.7.2.3
i am trying to follow this guide in order to move a project from svn to git. i don't particularly care about merging things upstream so this seems like the cleanest solution of those i've explored.
my issue is that when i execute git svn init file:///Users/Ankur/path/to/repository --no-metadata
i get the message Initialized empty Git repository in /Users/Ankur/path/to/repository/.git/
which is supposed to be the first line of the output anyway, but its supposed to be followed by individual messages about commits. i don't get anything else (and this executes pretty quickly).
i've verified the path that i am using is correct by doing svn co file:///Users/Ankur/path/to/repository
with the same repository to make sure i can checkout the repository normally.
details about my system: Mac OS X 10.6.5, which git
returns /usr/bin/git
(which i think means it was installed with Xcode because i removed the version i got with the git-osx-installer thinking it might have been the culprit initially). git --version
returnsgit version 1.7.2.3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
创建 git 存储库时:
git svn init
类似于git init
或svnadmin create
。他们都创建了空的仓库。git svn clone
类似于git clone
或svn checkout
。他们都复制远程存储库。When creating a git repository:
git svn init
is analogous togit init
orsvnadmin create
. They both create empty repos.git svn clone
is analogous togit clone
orsvn checkout
. They both make copies of remote repos.