.gitconfig の中身
.gitconfig の中身
dotfiles
をいじっている途中で、 .gitconfig
の中身が気になったので調べてみました。
.gitconfig の中身
一部省略しています。
# .gitconfig
[core]
excludesfile = /Users/username/.gitignore_global
...
[commit]
template = /Users/username/.stCommitMsg
...
わからなかったところを調べてみた
/Users/username/.stCommitMsg
.stCommitMsg
ファイルを見てみると何も書かれていませんでした。
っp
SourceTree
が設定したメッセージテンプレート。(st
== SourceTree
?)
/Users/username/.gitignore_global
.gitignore_global
ってなんだったけと思い調べてみると gitignore に書くべきでないものは gitignore_global へ - Qiita を見つけました。
ここで紹介されていた gitignore/Global at master · github/gitignore に .gitignore_global
の例がまとめられていました。
自分は、macOS
を使っているので、 gitignore/macOS.gitignore at master · github/gitignore を追加しておきました。
.DS_Store
をよく間違えてコミットしてしまっていたので、 .gitignore_global
に .DS_Store
はすでに追加していました。
# .gitignore_global
# ref: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk