| 用途 | 读写 Git 各级配置 |
|---|---|
| 语法 | git config [选项] <键> [<值>] |
| 配置层级 | system / global / local(仓库内) |
常用示例
常用示例
git config --global user.name zhangsan
git config --global user.email zhangsan@example.com
git config --get user.email
git config --list --show-origin | less
git config --global alias.st status设置前先用 git config --get 或 --list --show-origin 查看现值,可避免覆盖他人维护的仓库级配置。