本文介绍了如何使用BFG删除受保护的提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用BFG清理回购时( https://rtyley.github.io/bfg遇到以下情况:

 受保护的提交
----- ------------

这些是你的保护提交,所以它们的内容不会被改变:

* commit ***** **(受'HEAD'保护)


我会强烈建议你阅读它的文档(这可以说明这一点),但要回答你的问题:

BFG默认保持当前提交不变。它的作者认为唯一安全的工作流程是手动清理回购的当前状态,测试一切仍然有效,然后使用BFG清理历史记录,同时保留当前状态(您已经手动修复)。



如果您有一些您认为没有必要的用例(因为我经常用的话),有些选项可以将保护从默认(或关闭)变为可用。但如果你想使用那些,你肯定需要阅读文档。


When cleaning the repo with BFG (https://rtyley.github.io/bfg-repo-cleaner/) ,encountered the following :

Protected commits
-----------------

These are your protected commits, and so their contents will NOT be altered:

 * commit ******* (protected by 'HEAD')
解决方案

If you're going to use a tool as powerful as BFG, I'd strongly advise you to read its documentation (which spells this out), but to answer your question:

BFG by default leaves "current" commits unchanged. Its author believes the only safe workflow is to clean up your repo's current state manually, test that everything still works, then use BFG to clean up history while leaving the current-state (which you already fixed manually) alone.

There are options available to change the protection from default (or turn it off) if you have use cases where you think it's unnecessary (as I have more often than not); but if you want to use those, you definitely need to read the docs.

这篇关于如何使用BFG删除受保护的提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-04 20:29