Usuń plik .env z historii git
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD
# If it is available on remote repo
git push --force
MRA
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD
# If it is available on remote repo
git push --force