Table of Contents

3種類のgit config:

オプション ファイルの場所 説明
--system /etc/gitconfig システム全体(全ユーザー)用
--global ~/.gitconfig ユーザーの全リポジトリ用
--local project_folder/.git/.gitconfig リポジトリ用

Gitは--system--global--localの順にconfigを読み込む。後から読み込まれた設定が優先される。

設定リストを表示:

# すべての設定
git config -l

# Globalの設定
git config --global -l

使い方:

git config

参考文献: