From eb8815a6c296cf5c1c008effad57333a87165f13 Mon Sep 17 00:00:00 2001 From: Niccolo Borgioli Date: Mon, 16 Dec 2024 11:51:48 +0100 Subject: [PATCH] add removing secrets from git --- pages/git/remove-secrets.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 pages/git/remove-secrets.md diff --git a/pages/git/remove-secrets.md b/pages/git/remove-secrets.md new file mode 100644 index 0000000..1c6db81 --- /dev/null +++ b/pages/git/remove-secrets.md @@ -0,0 +1,9 @@ +# 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 +```