snippetbashTip
bfg — Remove large files or passwords from Git history like git-filter-branch. Note: If your repository is
Viewed 0 times
largecommandfilesremovefromclibfgpasswords
Problem
How to use the
bfg command: 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. More information: <https://rtyley.github.io/bfg-repo-cleaner/>.Solution
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. More information: <https://rtyley.github.io/bfg-repo-cleaner/>.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}}Code Snippets
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}}Context
tldr-pages: common/bfg
Revisions (0)
No revisions yet.