How can I completely replace a bitbucket repository with another repository?

前端 未结 2 714
醉酒成梦
醉酒成梦 2020-12-14 03:34

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 t

相关标签:
2条回答
  • 2020-12-14 03:50

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

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

    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.

    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.

    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.

    0 讨论(0)
  • 2020-12-14 04:07

    A picture is worth a thousand words.

    enter image description here

    0 讨论(0)
提交回复
热议问题