全局默认配置了用户名以及邮箱,现在需要给 Developer 文件夹配置单独的用户名、邮箱,如何解?
.gitconfig增加 includeIf 配置
# ...
[includeIf "gitdir:~/Work/"]
path = ~/Work/.gitconfig
[includeIf "gitdir:~/"]
path = ~/.gitconfig
新增 .gitconfig 配置文件
[user]
name = example_name
email = [email protected]
[core]
sshCommand = ssh -i ~/.ssh/work