bfg Cheatsheet

· 114 words · 1 minute read

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

Note: if your repository is connected to a remote, you will need to force push to it.

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

More information: https://rtyley.github.io/bfg-repo-cleaner/ .

I hope this post helps you. If you know a person who can benefit from this information, send them a link of this post. If you want to get notified about new posts, follow me on YouTube , Twitter (x) , LinkedIn , and GitHub .

Share:
waffarx cash back