跟进Is it possible to include a file in your .gitconfig,在.gitconfig
文件中使用include
有什么例外吗?为什么我的不能用了?
$ cat .gitconfig
[include]
path = /tmp/.gitconfig.id
$ cat /tmp/.gitconfig.id
[user]
name = Me
email = my@my.place.com
$ git config --global user.name | wc
0 0 0
$ git -v
git version 2.39.2
$ uname -rms
Linux 6.1.0-9-amd64 x86_64
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
也就是说,我发现自己可以用.gitconfig
中的include
来表示all第except和[user]
节.