How to Completely Remove .env/secrets File from Github Repository When Pushed By Mistake

Faisal Ahmed - Sep 15 '23 - - Dev Community

steps:

  1. git rm -r --cached .env
  2. git add .
  3. git commit -m"remove env file"
  4. git push
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .