0
0

More than 3 years have passed since last update.

gitignoreを使わずローカルのみ追跡対象から外したいファイルを設定する

Posted at

How to do it

  1. .git/info/excludeファイルに以下の1行追加

root/to/path.ext

  1. インデックスをアップデート

git update-index --assume-unchanged <file>

  1. 確認 git ls-files -v 以下の表示になればOKです
h root/to/path.ext

How to undo it

  1. .git/info/excludeファイルに以下の1行を削除
    root/to/path.ext

  2. インデックスをアップデート
    git update-index --no-assume-unchanged <file>

  3. 確認
    git ls-files -v
    何も出なければOK

以上

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