问题
I have to move a couple of repos from Gitlab to Bitbucket and discovered that the easiest way to do it seems to be:
- Create new empty repository in Bitbucket
git clone --mirror git@gitlab.com:path/to/repo.git
cd repo.git
git remote set-url origin git@bitbucket.org:path/to/repo.git
git push --mirror
This seems to copy the entire repo including tags, all branches etc. and I haven't discovered any disadvantages of this method yet. However, as I haven't seen this method anywhere on the internet, I'm afraid I'm missing something.
Can I safely use this method and remove the old repositories afterwards?
来源:https://stackoverflow.com/questions/49387671/move-git-repo-with-git-clone-mirror-and-git-push-mirror