Last active
October 18, 2021 06:56
-
-
Save bhatvikrant/f335eaa3ab44eb02428329f795972aa1 to your computer and use it in GitHub Desktop.
Remove .env from git history if you have committed environment variables by mistake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD | |
git push --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment