如何制作一个GitHub镜像到Bitbucket? [英] How to make a GitHub mirror to Bitbucket?
问题描述
我有一个回购,我已经从GitHub克隆出来,想要在BitBucket上拥有这个回购的镜像。有什么办法可以做到吗?就像我想的那样,在回购中有两个起源。
I have a repo that I've cloned from GitHub and want to have a mirror of this repo on BitBucket. Is there is any way how to do it? Something like having two origin in the repo as I think.
推荐答案
您可以简单地添加第二个远程:
You could simply add a second remote:
git remote add bitbucket /url/to/am/empty/bitbucket/repo
并将所有内容推送到bitbucket:
and push everything to bitbucket:
git push --mirror bitbucket
您实际上可以从您当地的回购中拉出或推送到多个远程。
如下面 Rahulmohan Kolakandy 的回答,如果您正在讨论关于 - 预测BitBucket服务器(而不是bitbucket.org),那么你可以利用 BitBucket服务器智能镜像。
As noted below in Rahulmohan Kolakandy's answer, if you are talking about an on-premise BitBucket server (as opposed to bitbucket.org), then you can take advantage of BitBucket Server Smart Mirroring.
这篇关于如何制作一个GitHub镜像到Bitbucket?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!