.gitconfig
の設定について確認。
ドキュメント
読み込み順
system
> global
> local
の順番で読み込まれる。
global
の設定は ~/.gitconfig
に記述される(gitconfigファイル記述例)。
設定
ユーザー名、メールアドレス
git config --global user.name "My Name" git config --global user.email myname@example.com
ファイル名の大文字・小文字の変更を検出するように設定
git config --global core.ignorecase false
git status
などの際に日本語ファイル名を表示
git config --global core.quotepath false
コミット時のエディタを変更
vim
git config --global core.editor 'vim -c "set fenc=utf-8"'
atom
git config --global core.editor "atom --wait"
sublime text
git config --global core.editor "mate -w"
gitコマンドの出力の色変更
参照;
git config --global color.diff auto git config --global color.branch auto
など。
改行コードを自動で変換する・しないの指定
true
の場合はチェックアウトの際に改行コードをLF
からCRLF
に変換します。
git config --global core.autocrlf true git config --global core.autocrlf false
gitの認証情報をキャッシュする
git config --global credential.helper 'cache --timeout=1000'
xcrun: errorが出る場合
エラー内容
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
この場合、xcode-select --install
をコマンドラインから入力して xcode-select
をインストールすれば解決。