LinuxCommandLibrary

bfg

Remove large files or passwords from Git history like git-filter-branch.

TLDR

Remove a file with sensitive data but leave the latest commit untouched

$ bfg --delete-files [file_with_sensitive_data]
copy


Remove all text mentioned in the specified file wherever it can be found in the repository's history
$ bfg --replace-text [path/to/file.txt]
copy

Help


Copied to clipboard