ETC/Git

[Git] .gitignore 참고하면 좋은 사이트, gitignore 변경 시 적용하는 방법

elisom 2021. 11. 23. (Last updated:

gitignore.io

https://www.toptal.com/developers/gitignore

 

gitignore.io

Create useful .gitignore files for your project

www.toptal.com

 

 

 

주로 사용하는 키워드

운영체제, 개발 환경(IDE), 언어

 

나의 경우,

Git

Windows, macOS, Linux

Intellij, AndroidStudio, Xcode

Android, Kotlin, Java, Node, Swift

등이 있었다.

 

 

 

기존 프로젝트에 .gitignore 업데이트 시 적용하는 방법

기존 프로젝트에서 .gitignore을 업데이트하게 되면 이미 push된 사항들을 제거해야 할 일이 생길 수 있다😥

이때 Local에서 아래와 같이 명령어를 입력해 없어야 할 파일들을 제거하면 된다.

$ git rm -r --cached .
$ git add .
$ git commit -m "Apply .gitignore"
$ git push