excludeファイルを使用して.gitignore
と同じ記法で、リポジトリの自分だけの除外設定ができる。
使い方
任意のエディタ等でexclude
ファイルを開く
# プロジェクトのルートに移動した上で以下コマンド
code .git/info/exclude
ファイルを開いたら.gitignore
と同じ要領でgitの追跡を無視したいファイル/ディレクトリを指定する。
# 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]
# *~
# ローカル限定の除外設定
.env.local
*.code-workspace
logs/
vscodeに設定を反映させるためにウインドウのリロードを行えばファイルが無視される。