如何将Bitbucket存储库完全替换为另一个存储库? [英] How can I completely replace a bitbucket repository with another repository?

查看:44
本文介绍了如何将Bitbucket存储库完全替换为另一个存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近不得不做一对夫妇需要使用hg convert重建存储库的更改.不幸的是,这意味着bitbucket存储库现在与我在本地拥有的副本不一致.我不想只是吹散" bitbucket上存在的存储库,因为它摆脱了与该项目相关联的所有其他自定义项/问题跟踪等.

I recently had to make a couple of changes which required rebuilding the repository using hg convert. Unfortunately, this means the bitbucket repo is now inconsistent with the copy I have locally. I don't want to just "blow away" the repo as it exists on bitbucket, because that gets rid of all the other customizations / issue tracking etc. that are associated with the project there.

是否有可能从Bitbucket的事物视图中完全擦除存储库,然后从本地(固定)存储库中推送所有内容?

Is it possible to completely wipe the repository from Bitbucket's view of things and push everything from my local (fixed) repo there?

推荐答案

您可以从Bitbucket存储库中 strip 变更集.转到

You can strip the changesets from the Bitbucket repository. Go to

https://bitbucket.org/<user>/<repo>/admin/strip

,您将有机会输入要删除的修订.您输入的修订号及其所有后代将从Bitbucket中删除.因此,如果输入0,则所有变更集将从远程存储库中删除.

and you'll get a chance to enter a revision to strip. The revision number you enter plus all its descendants will be deleted from Bitbucket. So if you enter 0, then all changesets will be removed from the remote repository.

这使您回到在Bitbucket上首次创建存储库时的状态,现在可以再次推送代码.

This brings you back to the clean slate you had when you first created the repository on Bitbucket and you can now push your code again.

项目设置保持不变(问题,Wiki),并且任何现有的派生叉也保持不变.分叉您的项目的人将必须执行相同的剥离操作-您必须与他们进行协调,这就是编辑历史记录很困​​难的原因. Bitbucket通过在地带管理页面上告诉您作品的数量来警告您.

The settings for the project remain intact (issues, wiki) and any existing forks also remain. People who've forked your project will have to do the same strip operation — you have to coordinate this with them and this is the reason why editing history is hard. Bitbucket warns you about this by telling you the number of works right on the strip admin page.

这篇关于如何将Bitbucket存储库完全替换为另一个存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆