gpt4 book ai didi

git - 如何为 Bitbucket 创建 GitHub 镜像?

转载 作者:IT王子 更新时间:2023-10-29 01:03:57 29 4
gpt4 key购买 nike

我有一个从 GitHub 克隆的存储库,我想在 BitBucket 上创建这个存储库的镜像。有什么办法吗?我认为在 repo 中有两个来源。

最佳答案

您可以简单地添加第二个 Remote :

git remote add bitbucket /url/to/am/empty/bitbucket/repo

并将所有内容推送到 bitbucket:

git push --mirror bitbucket

你实际上可以pull from or push to multiple remotes来自您的本地存储库。


2020 年更新:

如以下 Rahulmohan Kolakandy 中所述的 answer ,如果您谈论的是本地 BitBucket 服务器(而不是 bitbucket.org),那么您可以利用 BitBucket Server Smart Mirroring .

作为commented通过 V-Q-A NGUYEN :

BitBucket Server Smart Mirroring ( introduced originally in 2016Oct. 2017 for BitBucket Server )

is only available for customers with an active Bitbucket Data Center license

关于git - 如何为 Bitbucket 创建 GitHub 镜像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21551929/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com