将导入的存储库从 github 更新到 bitbucket
Update an imported repo from github to bitbucket
我使用 bitbucket 的 import repository 选项将一个 repo 从 GitHub 导入到 Bitbucket。它已导入所有分支、标签、提交等。
现在,原来的仓库已经改变了,新的 branches/tags/commits 已经在原来的仓库中创建了。我如何更新我的 bitbucket 的回购协议以与 Github 的回购协议相提并论?
PS:我可以删除 bitbucket 存储库并重新镜像 Github 的存储库。但是,我想知道另一种使用差异更新 bitbucket 存储库的方法。
PPS:我可以将最新的 master 拉到我的本地,然后将其推送到 butbucket 的 master,但我也想推送所有新的 branches/tags。
最简单的方法是:
- 克隆 github 存储库
将 bitbucket 添加为远程
git remote add bb /url/to/bitbucket/repo
push to it with the --mirror
option:
git push --mirror bb
这将推送所有内容(分支 和 标签)
在这种情况下,如果您在 BitBucket 上的工作是在专用分支而不是 BitBucket 和 GitHub 存储库之间的公共分支中完成的,将会有所帮助。
我使用 bitbucket 的 import repository 选项将一个 repo 从 GitHub 导入到 Bitbucket。它已导入所有分支、标签、提交等。
现在,原来的仓库已经改变了,新的 branches/tags/commits 已经在原来的仓库中创建了。我如何更新我的 bitbucket 的回购协议以与 Github 的回购协议相提并论?
PS:我可以删除 bitbucket 存储库并重新镜像 Github 的存储库。但是,我想知道另一种使用差异更新 bitbucket 存储库的方法。
PPS:我可以将最新的 master 拉到我的本地,然后将其推送到 butbucket 的 master,但我也想推送所有新的 branches/tags。
最简单的方法是:
- 克隆 github 存储库
将 bitbucket 添加为远程
git remote add bb /url/to/bitbucket/repo
push to it with the
--mirror
option:git push --mirror bb
这将推送所有内容(分支 和 标签)
在这种情况下,如果您在 BitBucket 上的工作是在专用分支而不是 BitBucket 和 GitHub 存储库之间的公共分支中完成的,将会有所帮助。