Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1.28 KB

README.md

File metadata and controls

39 lines (25 loc) · 1.28 KB

BFG Repo-Cleaner Build Status

Removes large or troublesome blobs like git-filter-branch does, but faster - and written in Scala - Fund the BFG

$ bfg --strip-blobs-bigger-than 1M --replace-text banned.txt repo.git

The BFG is a simpler, faster (10 - 720x faster) alternative to git-filter-branch for cleansing bad data out of your Git repository:

  • Removing Crazy Big Files
  • Removing Passwords, Credentials & other Private data

Main documentation for The BFG is here : https://rtyley.github.io/bfg-repo-cleaner/

New version waiting for PR approval on parent repo

Compiling the master branch code permit to work with multi-line regexes (see PR).

With the following config file:

replace.txt:

regex:(?s)if __name__ == '__main__':[.\s\S]*==>print("DELETED!!")

Running the following command:

java -jar bfg.jar --multi-line-regex --replace-text replace.txt

It will successfully replace all code after:

if __name__ == '__main__':