으.. 불-편
문제) github Repo에 node_modules이 공유되어서 관리가 어려움, 따라서 node_modules를 제외한 파일들만 관리하고 싶음
tool : VScode
node_modules/
node_modules\
git rm -r --cached node_modules/ // git repo 캐시 삭제 후 ignore 적용시도
git rm -r --cached node_modules\
git rm -r --cached node_modules
git rm -r --cached . // 전체 삭제 및 초기화
git add .
git commit -m "test"
git push
git status --ignored
이 명령어를 통해 node_modules가 적용이 안되어 있음을 확인.
😥
gitignore.io를 통해서 .gitignore 파일 소스를 받아오기도 함.
++
git rm -r --cached .
git add .
git commit -m "text"
tool : IntelliJ
커밋을 한 적이 없음을 확인??
하지만 workspace.xml은 변경되어 있다.
+++
.git/info/exclude
.gitignore와 같은 동일한 파일 규칙을 갖고 있다.
.git/info/exclude 파일을 열어서 위와 같이 수정
수정 후 위와 같이 git update-index --skip-worktree
변경한 exclude 적용
이 로컬저장소에 한하여 node_modules, .idea 폴더 ignore 기능 적용.
휴,, 편-안
++++
모듈을 제외한 후 소스가 실행이 안될 경우 모듈을 다른 디렉토리에 설치한 후 기존 디렉토리의 모듈을 삭제후 옮기세요.