简体   繁体   English

是否有Git命令导入hg存储库

[英]Is there a Git command to import a hg repository

With git svn clone I can work on a subversion repository using git. 使用git svn clone我可以使用git在subversion存储库上工作。 Is there a similar way to work on Mercurial (hg) repositories? 是否有类似的方法来处理Mercurial(hg)存储库?

There isn't anything built in. 没有任何内置的东西。

You can use git-hg however, which I use a lot and works great for pulling hg repos and updates to a git repo, but the downside of it is that you cannot push updates made to your git repo to a hg repo with git-hg . 您可以使用git-hg但是,我用了很多,拉汞回购和更新一个混帐回购协议的伟大工程,但它的缺点是,你不能把你的混帐回购协议所作的更新与一个汞回购git-hg

The Mercurial extension hg-git is another way to go in the Hg->Git direction. Mercurial扩展hg-git是另一种进入Hg-> Git方向的方法。 If you just want to go in that direction, so far as I can see, it and git-hg both work well. 如果你只是想朝这个方向前进,我可以看到,它和git-hg都运作良好。 More details here . 更多细节在这里

If it was the other case, I mean if you need a git->hg conversion you can use mercurial's Convert extension . 如果是另一种情况,我的意思是如果你需要git-> hg转换,你可以使用mercurial的Convert扩展 But for your question git-hg should do fine. 但对于你的问题, git-hg应该没问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM