I recently accidentally committed my
.envrc file! Luckily it was just a public key this time, but I almost pushed some private credentials. So I had to remove that file from multiple git commits before I pushed again.
You can remove a file from all git history with
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .envrc" HEAD