프로그래밍/Visual Studio Code
[Visual Studio Code] .gitignore 설정하기
toeun
2021. 5. 10. 18:50
Visual Studio Code에서 git을 설정하여 사용하고있다.
React 개발을 하던 중, .history 라는 디렉토리에 views 디렉토리의 js 파일에 대한 누적이 발생하고 있다.
(이 디렉토리 뭔지 아시는 분은 댓글 부탁합니다ㅜ)
우선 너무 많아져서 비기싫으니 gitignore에 등록하도록 한다.
처음 하게되면, 구글링하게 되는데
gitignore를 쉽게 할 수 있는 확장 프로그램들도 있지만, (.gitignore 파일이 없는 경우)
직접 .gitignore 파일을 수정하도록 한다.
Ctrl + P (윈도우 기준) 로 .gitignore 파일을 열어주고 git에서 관리하기 싫은 directory를 작성한다.
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# 기타
/.history
그러면 깔꼼해진다.
기억하기 끝.