Project에 원하지 않는 Backup File이나 Log File , 혹은 컴파일 된 파일들을 Git에서 제외시킬수 있는 설정 File이다.
항상 최상위 Directory에 존재해야한다.
# : comments
# no .a files
*.a
# but do track lib.a, even though you're ignoring .a files above
!lib.a
# only ignore the TODO file in the current directory, not subdir/TODO
/TODO
# ignore all files in the build/ directory
build/
# ignore doc/notes.txt, but not doc/server/arch.txt
doc/*.txt
# ignore all .pdf files in the doc/ directory
doc/**/*.pdf
.gitignore File을 같이 Push하면 된다.
git rm -rf .idea
git commit -m "delete .idea"
git push
참고 : https://stackoverflow.com/questions/32384473/gitignore-not-ignoring-idea-path, https://nesoy.github.io/articles/2017-01/Git-Ignore