Passing Mercurial (Hg) branch to GitHub

I have a small project project MvcOpenId. I host the source for this on Codeplex and GitHub . Localy I use Mercurial (Hg) for version control, and then with the hg-git plugin, which I click on both online repositories. It still works. I added a branch to my Mercurial (Hg) repository. The push to Codeplex went smoothly, but the push to GitHub is not so much. The GitHub repository does not show any branches, and only those that were made into branches were clicked.

How can I push my entire Mercurial (Hg) repository to GitHub, including all branches and all that?

+3
source share
2 answers

I noticed that git branches are well imported and then re-exported using hg-git, but in the form of bookmarks. This may not be very convenient for you, but you can try the following:

  • git first clone the existing github repository,
  • then create a new branch (git), then commit and click,
  • finally clone github repo to hg using hg-git

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

I know this is a little cumbersome .. but it can help you nonetheless.

Cheers,
Christoph.

+5

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://git@github.com/some/project
0

Source: https://habr.com/ru/post/1782109/


All Articles