LoginSignup
11
10

More than 5 years have passed since last update.

gitの管理を避けるためのあれやこれ

Last updated at Posted at 2016-08-25

定期的にググってるのでメモ。

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
11
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
10