将 Mercurial (Hg) 分支提交到 GitHub

发布于 2024-10-09 00:42:46 字数 406 浏览 0 评论 0原文

我有一个名为 MvcOpenId 的小项目。我在 CodeplexGitHub。本地我使用 Mercurial (Hg) 进行版本控制,然后使用 hg-git 插件推送到两个在线存储库。到目前为止,这一直运作良好。我已向我的 Mercurial (Hg) 存储库添加了一个分支。向 Codeplex 的推送很顺利,但向 GitHub 的推送则不太顺利。 GitHub 存储库不显示任何分支,仅推送了分支提交。

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

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

演多会厌 2024-10-16 00:42:46

我注意到 git 分支可以很好地导入,然后由 hg-git 重新导出,但以书签的形式。这对你来说可能不是很用户友好,但你可以尝试以下操作:

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

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

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

干杯,
克里斯托夫.

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.

奈何桥上唱咆哮 2024-10-16 00:42:46

在 hggit 0.8 中,我可以只使用书签并将其推送到 github 中。

hg clone git://github.com/some/project
cd project
hg bookmark new-branch

...work something...

hg commit
hg push git+ssh://[email protected]/some/project

In hggit 0.8, I can just use bookmark and push it into github.

hg clone git://github.com/some/project
cd project
hg bookmark new-branch

...work something...

hg commit
hg push git+ssh://[email protected]/some/project
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文