定期的にググってるのでメモ。
gitで管理されているファイル
update-index --skip-worktree
gitの操作の影響を受けない。gitの操作で変更されない。大抵こっちを使ってる。
# 登録
$ git update-index --skip-worktree <pathToFile>
# 解除
$ git update-index --no-skip-worktree <pathToFile>
update-index --assume-unchanged
reset等のgitの操作の影響を受ける。
# 登録
$ git update-index --assume-unchanged <pathToFile>
# 解除
$ git update-index --no-assume-unchanged <pathToFile>
skip-worktreeとassume-unchangedの解説や利用シーンは
http://qiita.com/usamik26/items/56d0d3ba7a1300625f92
が詳しい
gitで管理されていないファイル
gitignoreに追記する
.gitignore
にパスを追記
git管理のrootからのパス
./path/to/file
gitignoreに追記出来ない場合
.git/info/exclude
にパスを追記
こちらもgit管理のrootからのパス
./path/to/file