简体   繁体   中英

Forking an hg repo from BitBucket into a GitHub repo

What's the quickest way to clone/fork a Mercurial repo from BitBucket to a Git repo in GitHub?

I'm aware that I can clone to a local repo, convert to git and then push to a new GitHub repo. Let's call this the manual way of doing this. I'm also aware that this isn't really a "fork" since the two repos aren't connected in any way. That's fine with me, I just want to be able to use this repo as a submodule and don't care that much about being able to send pull requests to the original hg project. I'm just wondering if there's some tool to automate this process. A kind of BitBucket-Git clone tool.

Well, there's the hg-git plugin that you could use. It allows you to use hg to talk to a git server. With the plugin, you could simply pull from the repository on Bitbucket and push to the repository on Github using Mercurial.

As described on the plugin homepage, this process is lossless, so it's possible to work with the Github repository as if it was just another Mercurial repository. Obviously, the Github/Bitbucket web interfaces still won't integrate with one another tough.

On a personal sidenote, I really wish Github/Bitbucket would somehow be able interoperate, but I guess that is wishful thinking ;-).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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