How to move git repository with all branches from bitbucket to github?
What is the best way to move a git repository with all branches and full history from bitbucket to github? Is there a script or a list of commands I have to use?
You can refer to the GitHub page "Duplicating a repository"
It uses:
git clone --mirror
: to clone every references (commits, tags, branches) git push --mirror
: to push everything That would give:
git clone --mirror https://bitbucket.org/exampleuser/repository-to-mirror.git
# Make a bare mirrored clone of the repository
cd repository-to-mirror.git
git remote set-url --push origin https://github.com/exampleuser/mirrored
# Set the push location to your mirror
git push --mirror
As Noted in the comments by LS:
Import Code
feature from GitHub described by MarMass. See https://github.com/new/import
It's very simple.
1º Create a new empty repository in GitHub (without readme or licesne, you can add them before) and the following screen will show
2º Inside to import code option you paste your bitbucket URL's repo and voilà!!
In case you couldn't find "Import code" button on github, you can:
url
. It will look like: Public
or Private
repo Begin Import
UPDATE: Recently, Github announced the ability to "Import repositories with large files"
链接地址: http://www.djcxy.com/p/45188.html上一篇: 如何从git存储库中删除目录?