Is there a Git command to import a hg repository

て烟熏妆下的殇ゞ 提交于 2019-12-20 10:27:24

问题


With git svn clone I can work on a subversion repository using git. Is there a similar way to work on Mercurial (hg) repositories?


回答1:


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.




回答2:


The Mercurial extension hg-git is another way to go in the Hg->Git direction. If you just want to go in that direction, so far as I can see, it and git-hg both work well. More details here.




回答3:


If it was the other case, I mean if you need a git->hg conversion you can use mercurial's Convert extension. But for your question git-hg should do fine.



来源:https://stackoverflow.com/questions/5225666/is-there-a-git-command-to-import-a-hg-repository

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!