Command-line tool
bfg
brew/bfg
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Remove large files or passwords from Git history like git-filter-branch
At a glance
- Type
- Command-line tool
- Install on
- Windows, macOS
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
Windows
scoop install bfg
macOS
brew install bfg
Remove a file with sensitive data but leave the latest commit untouched
bfg --delete-files file_with_sensitive_data
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
Related command-line tools
- git-filter-repo
Quickly rewrite git repository history - zip
Compression and file packaging/archive utility - sq
Data wrangler with jq-like query language - lrzip
Compression program with a very high compression ratio - tig
Text interface for Git repositories - atuin
Improved shell history for zsh, bash, fish and nushell rust history powershell shell - gomi
Functions like rm but with the ability to restore files - legit
Command-line interface for Git, optimized for workflow simplicity
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents