Make sure to safely backup the .env file first. Because this command will delete it from your system
git filter-branch --index-filter 'git rm --cached --ignore-unmatch .env' HEAD
git push --force
Run this command and froce push
git update-ref -d refs/original/refs/heads/main
Top comments (0)