GIT 从裸存储库中拉取
我有一个 GIT 存储库 A,它是使用 subversion 存储库中的“git svn”设置的。我对 A 进行了克隆,称为 B,其中 B 是一个裸存储库(git clone --bare)。我从 B 克隆 C,在 C 上工作并定期将我的更改推送到 B(这就是我将 B 设为裸的原因)。现在,当我想从 subversion 获取最新更新时,我在存储库 A 上运行“git svn rebase”。如何将这些更新从 A 拉到 B。移动到 B 并执行“git pull”失败,并出现错误 - “致命” :没有工作树就无法使用 /usr/local/git-1.7.0/libexec/git-core/git-pull。”。将更新从 A 移动到 B 的正确方法是什么
I have a GIT repo A which was setup using "git svn" from a subversion repo. I made a clone of A called B, where B is a bare repository(git clone --bare). I clone C from B, work on C and periodically push my changes to B (the reason I made B bare). Now, when I want to pickup the latest updates from subversion I run "git svn rebase" on repo A. How do I pull these updates from A to B. Moving to B and executing "git pull" fails with the error - "fatal: /usr/local/git-1.7.0/libexec/git-core/git-pull cannot be used without a working tree.". What is the correct way to move the updates from A to B
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于 B 是裸露的,您可能希望将更改从 A 推送到 B。
您所描述的似乎是大量的推拉,但没有明显的好处。通常,您可以通过直接在使用 git svn clone 创建的存储库中工作来使用 git-svn。您创建所有这些额外存储库是否有特殊原因?
Since B is bare, you probably want to push the changes from A into B.
What you've described seems like a lot of pushing and pulling without an obvious benefit. Normally you would use git-svn by working directly in the repository that you created using
git svn clone
. Is there a particular reason why you're creating all those extra repositories?