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

笑着哭i 提交于 2019-11-28 19:36:30

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.

A picture is worth a thousand words.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!