How to remove a protected commit using BFG

后端 未结 4 847
佛祖请我去吃肉
佛祖请我去吃肉 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:46

    First What is BFG? The BFG is a simpler, faster alternative to git-filter-branch for cleansing bad data out of your Git repository history: * Removing Crazy Big Files * Removing Passwords, Credentials & other Private data.

    Suppose,You have made some mistakes in the past, but now you've cleaned up your act. Thus the BFG assumes that your latest commit is a good one, with none of the dirty files you want removing from your history still in it. This assumption by the BFG protects your work, and gives you peace of mind knowing that the BFG is only changing your repo history, not interfere with the current files of your project. By default the HEAD branch is protected, and while its history will be cleaned, the very latest commit (the 'tip') is a protected commit and its file-hierarchy won't be changed at all.

    For more study you can refer this link

提交回复
热议问题