Removing a .env file from Git history
I'm sure this happens to everyone sometimes. You accidentally pushed a file with secrets or a password that shouldn't have gotten into the Git history.
In the following example, I "accidentally" pushed my .env file to Git simply because I forgot to a...
h.daily-dev-tips.com2 min read
Jimmie Butler
Freelance Developer
What's the point in doing this? Regardless of what's in git, the credentials need revoked and git-ignored to prevent in the future. Removing from git history is some extra steps that doesn't really do anything.