4
2

More than 5 years have passed since last update.

tigのUntracked filesが表示されない件

Posted at

問題

tigにはUntracked files (履歴管理していないファイル) を表示する機能がありますが、あるタイミングから表示されなくなってしまい困っていました。

git statusには表示される

On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    bar.txt
    foo.txt
    hoge.txt

でも、tig status には表示されない

Untracked files:
  (not shown)

今回、その解決方法が分かったのでメモしておきます。

解決方法

jonas/tig#595
Githubのissueによると、2種類の方法が提案されています。

a) ~/.tigrcに次の項目を追加する

set status-show-untracked-files = yes

b) /usr/local/etc/tigrc を削除 (もしくは移動)

$ rm -f /usr/local/etc/tigrc
※ Homebrew (macOS) を前提にしています。他の環境ではパスが異なるかもしれません

どうも システムの設定 (/usr/local/etc/tigrc) が存在すると内部のデフォルト値が無視されるようですね。システムの設定を削除して内部のデフォルト値を参照させるか、明示的に status-show-untracked-files を有効にすれば、ちゃんと表示されるようになります。

4
2
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
4
2