Skip to content

Instantly share code, notes, and snippets.

@ronknight
Last active May 29, 2024 19:38
Show Gist options
  • Save ronknight/9ed21a737f10c927a159f3cfcf4e8eb0 to your computer and use it in GitHub Desktop.
Save ronknight/9ed21a737f10c927a159f3cfcf4e8eb0 to your computer and use it in GitHub Desktop.
remove .env from git and history
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