使用 hg-git 时不会推送任何更改
我试图让 hg-git 扩展在 Windows 下工作,经过几个小时的摆弄,我终于让它工作了。然而,即使 hg Push 的输出显示为:
importing Hg objects into Git
creating and sending data
github::refs/heads/master => GIT:8d946209
[command completed successfully Wed Oct 20 15:26:47 2010]
I'm trying to get the hg-git extension working under Windows and after hours of fiddling, I finally seem to have it working. However, nothing shows up in my git repository even though the output of hg push reads:
importing Hg objects into Git
creating and sending data
github::refs/heads/master => GIT:8d946209
[command completed successfully Wed Oct 20 15:26:47 2010]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试发出命令
hg bookmark -f master
(使用
-f
强制移动现有书签),然后再次尝试推送。
这是有效的,因为 Hg-Git 将您的书签作为分支推送到 Git 服务器 并将拉取 Git 分支下来并将它们设置为书签。 (来自官方README.md)
Try issuing the command
hg bookmark -f master
(use
-f
to force an existing bookmark to move)Then try pushing again.
This works because Hg-Git pushes your bookmarks up to the Git server as branches and will pull Git branches down and set them up as bookmarks. (from the official README.md)
而且似乎就在我问完这个之后,我做了一个微不足道的改变。这个东西被捡起来推了推。所以看来你必须等到你做出新的提交才能让 hg-git 接受它。
And it seems that just after I asked this, I made a trivial change. This was picked up and pushed. So it seems that you have to wait until you've made a new commit in order for hg-git to pick it up.
我选择“使用自述文件初始化此存储库”。这意味着我最终得到了两个头,我无法
hg merge
,因为其中一个有书签。为了让推送工作,我必须:
hg Heads
使用哪个 id),这最终得到如下命令(替换
部分),确保您选择远程修改上面的合并 - 如果你不这样做,它就不起作用!
I had chosen to 'Initialize this repository with a README'. This meant I ended up with two heads, which I couldn't
hg merge
because one had a bookmark.To get pushing working, I had to:
hg heads
),This ended up with commands as follows (substituting in
<x>
sections)make sure you pick the remote revision for the merge above - if you don't it doesn't work!