How to remove a protected commit using BFG

后端 未结 4 877
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-19 01:02

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

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

These are your pr         


        
4条回答
  •  余生分开走
    2021-02-19 01:38

    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.

提交回复
热议问题