如何正确删除集市分支? [英] How to properly remove a bazaar branch?

查看:23
本文介绍了如何正确删除集市分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从存储库中正确删除 bazaar 分支?

How to properly remove a bazaar branch from a repository?

如果我想彻底删除一个分支,所以找不到这个分支是否存在怎么办?

What if I want to remove a branch completely, so it would be impossible to find if this branch existed?

我知道 remove-branch 命令,但还有其他替代方法吗?

I'm aware of the remove-branch command, but are there any alternatives?

推荐答案

如果你想放弃分支,你可以只使用普通的 rm -rf branch_name(或 Windows 上的类似机器,包括清理回收站).

If you want to ditch the branch, you can just use plain rm -rf branch_name (or similar machinery on Windows, including cleaning Recycle Bin).

一些历史记录仍然保留在共享存储库中,可以使用 bzr head --dead 命令找到.如果您绝对需要确保没有隐藏的历史记录,则需要做一些更复杂的事情:

Some history still be preserved in shared repository though, and could be found with bzr heads --dead command. If you absolutely need to be sure no hidden history left you need to do something more involved:

# make new empty shared repository
bzr init-repo /path/to/temp-repo
# branch everything from old repo to temp-repo
bzr branch /path/to/old-repo/branch-1 /path/to/temp-repo/branch-1
...
bzr branch /path/to/old-repo/branch-N /path/to/temp-repo/branch-N
# after that you're ready to delete old-repo and replace it with temp-repo
# newly created repo will have only revisions present in active branches

这篇关于如何正确删除集市分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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