Completely removing a .env file from Git history

PHOTO EMBED

Thu Dec 16 2021 03:15:20 GMT+0000 (UTC)

Saved by @juancalle #git

git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD

git push --force
content_copyCOPY

https://h.daily-dev-tips.com/removing-a-env-file-from-git-history