Skip to content

Instantly share code, notes, and snippets.

@gjerokrsteski
Last active July 11, 2024 08:40
Show Gist options
  • Save gjerokrsteski/e4a10352448158ba827493eb116cda51 to your computer and use it in GitHub Desktop.
Save gjerokrsteski/e4a10352448158ba827493eb116cda51 to your computer and use it in GitHub Desktop.
remove env file from git history forever
echo '.env' >> .gitignore
git rm -r --cached .env
git add .gitignore
git commit -m 'untracking .env'
git push origin master
@169398
Copy link

169398 commented Jul 2, 2024

It really worked thank you

@delabi
Copy link

delabi commented Jul 11, 2024

Perfect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment