提交Mercurial(Hg)分支给GitHub [英] Commiting Mercurial (Hg) branch to GitHub

查看:286
本文介绍了提交Mercurial(Hg)分支给GitHub的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为MvcOpenId的小项目项目。我在 Codeplex GitHub 。 Localy我使用Mercurial(Hg)进行版本控制,然后使用hg-git插件推送给两个在线存储库。迄今为止这一直很好。我已将一个分支添加到我的Mercurial(Hg)存储库。对Codeplex的推动进展顺利,但对GitHub的推动不多。 GitHub仓库不显示任何分支,只有分支提交已被推送。



如何将我的整个Mercurial(Hg)存储库推送到GitHub,包括所有分支机构和所有内容?

解决方案

我一直注意到git分支很好地导入然后由hg-git重新导出,但是以书签。它可能不是非常用户友好的,但你可以尝试以下内容:




  • 首先git克隆现有的github回购,
  • >
  • 然后创建一个新的(git)分支,然后提交并推送,
  • 最后使用hg-git将github仓库复制到hg中



完成这些步骤后,您应该可以在hg中看到新的git分支(在书签列表中)。您可以用经典的方式处理它: hg update -C< name> 然后提交。当你推送与这个书签相关的变更集时,hg-git应该在github上的相应git分支中添加一个新变更集。



我知道这有点麻烦..但它可以帮助你。

欢呼,

Christophe。


I have a little project project called MvcOpenId. I host the source for this on both Codeplex and GitHub. Localy I'm using Mercurial (Hg) for version control and then with the hg-git plugin I'm pushing to both online repositories. This has been working well until now. I've added a branch to my Mercurial (Hg) repository. The push to Codeplex went smooth, but the push to GitHub not so much. GitHub repository does not show any branches and only the branch commits have been pushed.

How can I push my whole Mercurial (Hg) repository to GitHub including all the branches and everything?

解决方案

I have been noticing that git branches are well imported then re-exported by hg-git, but in the form of bookmarks. It might not be very user-friendly for you but could you try the following:

  • first git clone your existing github repo,
  • then make a new (git) branch, then commit and push,
  • finally clone the github repo into hg using hg-git

After these steps you should see your new git branch in hg (in the list of bookmarks). You can work on it in a classical way: hg update -C <name> then commit. And when you push a changeset related to this bookmark, hg-git should add a new changeset to the corresponding git branch on github.

I know it's a bit cumbersome.. but it might help you nevertheless.

Cheers,
Christophe.

这篇关于提交Mercurial(Hg)分支给GitHub的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆