[Git] .env 파일 삭제하기

이경은·2023년 3월 14일
0

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에-올라갈-때

profile
Web Developer

0개의 댓글