memoir/pages/git/remove-secrets.md

10 lines
373 B
Markdown
Raw Permalink Normal View History

2024-12-16 10:51:48 +00:00
# Remove secrets after being pushed
If you accidentally pushed a secret or some file that should not be publicly available in your git repo, there are a few ways. My personal fav is [BFG](https://rtyley.github.io/bfg-repo-cleaner/).
> `--no-blob-protection` also modifies you latest commit, by default that is turned off.
```bash
bfg -D "*.txt" --no-blob-protection
```