[개발환경구축] .gitignore 파일 설정

Weirdo·2022년 9월 7일
0

.gitignore 파일 설정을 미리 해야 한다!!
commit 시도하다가 에러나면 git cache에 남는다.
commit 했을 때, /node_module 특정 index.d.ts에서만 analyzing code로 멈춰있어서 해당 파일에서만 에러를 찾았더니 해결이 늦어졌다.

  1. git cache에 남아있는 걸 삭제한다.
git rm --cached -r <폴더명 or 파일명>
  1. 설치된 폴더/파일 삭제
rm -rf node_modules           
  1. 재설치
npm i
  1. .gitignore에 해당 폴더/파일 입력해둔다.
/node_modules
  1. git에 commit했을 때, 에러나지 않는다!!!
profile
Yeah, weirdos change the world

0개의 댓글