gitignore에 .env 파일이 있었는데도 불구하고 .env 파일이 같이 올라가서 이를 삭제하고자 했다.
아래의 명령을 사용해서 repository에 있는 .env 파일을 삭제했다.
git rm .env --cached
git add .
git commit -m "remove .env file from git"
git push
참조
https://velog.io/@hoje15v/.gitignore에-.env-파일-올려도-git에-올라갈-때