1

Hello is there a tool for git that allow to work with mercurial repositories

F.e. for svn there is a git-svn package, that allows to clone/commit/update from svn and work in a git way..

So is there some tool for mercurial for that ?

Djangonaut
  • 5,511
  • 7
  • 40
  • 53
  • possible duplicate of [Git interoperability with a Mercurial Repository](http://stackoverflow.com/questions/883452/git-interoperability-with-a-mercurial-repository) – skolima Jul 20 '11 at 11:35

2 Answers2

4

See this related SO question: Git interoperability with a Mercurial Repository

It seems that hg2git is of interest. It is part of the git fast-export family of tools.

If you want hg to push/pull from a git repo, then consider the Hg-Git Mercurial Plugin.

Community
  • 1
  • 1
Tim Henigan
  • 60,452
  • 11
  • 85
  • 78
  • 1
    `hg-git` is *very* nice, but its designed to allow Mercurial to be a client for Git. Doing it the other way around is possible, but it's slightly convoluted. As a Mercurial user I find it *very* handy though. – quark Nov 17 '09 at 21:24
0

There is 'bridge support for Mercurial and Bazaar' now distributed as part of git: git-remote-hg is in the git tree under contrib/remote-helpers. It is not full-featured, so it will allow you to clone a hg repo in git, but more advanced operations like tagging and branching may not work.

I recommend gitifyhg. It's a fork of git-remote-hg, and the team responsible seems to be more responsive to bugs, so you can tag and branch just as you ordinarily would with a git repo, except it's Mercurial at the backend. It's available in pypi, so you can just easy_install gitifyhg, and then:

git co gitifyhg::ssh://my.repo//path/to/repo
Paul Price
  • 2,657
  • 30
  • 26