Djangonaut
Djangonaut

Reputation: 5821

git for mercurial like git-svn

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 ?

Upvotes: 1

Views: 1047

Answers (2)

Paul Price
Paul Price

Reputation: 2787

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

Upvotes: 0

Tim Henigan
Tim Henigan

Reputation: 62168

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.

Upvotes: 4

Related Questions