[user]
name = user1
email =
[includeIf "gitdir:/Users/lin/ifly/"]
path = /Users/lin/.gitconfig-works
[includeIf "gitdir:/Users/lin/person/"]
path = /Users/lin/.gitconfig-codes
[core]
excludesfile = /Users/lin/.gitignore_global
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
注意:includeIf里面的目录地址需要在最后追加"/"才可以。
测试,在项目目录下执行:`git config --show-origin --get user.name`