【Git】ローカルのファイルだけgitignoreしたい時の設定

Gitの管理対象外にしたいけどプロジェクト共通で設定しないといけない訳でもないファイル達(IntelliJの.ideaみたいなやつ)がある時は .git/info/excludeにgit管理させないディレクトリを書くと自動的にignoreしてくれる

$ vi .git/info/exclude

例:

 # git ls-files --others --exclude-from=.git/info/exclude
 # Lines that start with '#' are comments.
 # For a project mostly in C, the following would be a good set of
 # exclude patterns (uncomment them if you want to use them):
 # *.[oa]
 # *~

 .idea/