단순히 git ignore 파일에 아래와 같이 추가하면 git에서 관리하지 않는다.
**/node_modules
git ignore에 아무리 추가해도 제외가 안되는 경우,
이미 git에 올리갔을 경우이다.
따라서, git 캐시에 저장된 데이터를 모두 삭제해줘야 한다.
git rm : 원격, 로컬 저장소 모두 삭제
git rm --cached : 원격 저장소에서만 삭제
git rm -r --cached [제외하려는 폴더경로]
git rm -r --cached src/main/app/node_modules
이렇게 하고, 변경사항을 확인하면 git 에서 제외되는 것을 볼 수 있다.
'IT정보 > Error' 카테고리의 다른 글
[Mac] 맥OS 업데이트 후, xcode 에러 해결(+ Software Update 어쩌고..) (0) | 2024.08.27 |
---|---|
Connection is read-only. Queries leading to data modification are not allowed 에러 해결 (0) | 2024.05.23 |
zsh: command not found: nvm (1) | 2023.06.15 |
[Error] JTA에러 "XAER_RMERR: Fatal error occurred in the transaction branch - check your data for consistency" (1) | 2023.04.24 |
There are stopped jobs. (0) | 2022.09.05 |