[Trouble shooting]
.gitignore 적용이 안되는 상황
UtakerS
2025. 1. 23. 14:08
반응형
오류
https://itsy-bitsy.tistory.com/entry/gitignore-%EC%82%AC%EC%9A%A9%EB%B2%95
.gitignore을 설정하고 push 했지만
무시되지 않고 그대로 배포가 되는 상황
원인 찾기
이미 push를 한적이 있다면 파일은 자동으로 추적되고 .gitignore에 추가해도 무시되지 않는다.
이 경우 Git에서 해당 파일을 제거해야 합니다.
오류해결
git bash에서
$ cd ysy_project_repo
$ git rm --cached ysy_env_win/ -r
$ git rm --cached config/settings.py
$ git commit -m "Remove files from tracking"
$ git push -u origin +master
반응형