[user] name = xxxxxx email = xxxxxx@qq.com # The contents of this file are included only for GitLab.com URLs [includeIf "hasconfig:remote.*.url:https://gitlab.xxxxx.com/**"] [includeIf "hasconfig:remote.*.url:https://github.com/**"]
# Edit this line to point to your alternative configuration file path = ~/.gitconfig-gitlab path = ~/.gitconfig-github
[commit] gpgsign = false [gpg] program = C:\\Program Files (x86)\\GnuPG\\bin\\gpg.exe
.gitconfig-gitlab 内容如下:
1 2 3 4 5 6 7
[user] name = xx email = xxx@xxx.com signingkey = 密钥ID [commit] gpgsign = true