File tree 1 file changed +3
-3
lines changed
book/01-introduction/sections
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ Git 自带一个 `git config` 的工具来帮助设置控制 Git 外观和行为
14
14
2. `~/.gitconfig` 或 `~/.config/git/config` 文件:只针对当前用户。
15
15
你可以传递 `--global` 选项让 Git 读写此文件,这会对你系统上 **所有** 的仓库生效。
16
16
3. 当前使用仓库的 Git 目录中的 `config` 文件(即 `.git/config`):针对该仓库。
17
- 你可以传递 `--local` 选项让 Git 强制读写此文件,虽然默认情况下用的就是它。。
17
+ 你可以传递 `--local` 选项让 Git 强制读写此文件,虽然默认情况下用的就是它。
18
18
(当然,你需要进入某个 Git 仓库中才能让该选项生效。)
19
19
20
20
每一个级别会覆盖上一级别的配置,所以 `.git/config` 的配置变量会覆盖 `/etc/gitconfig` 中的配置变量。
@@ -89,7 +89,7 @@ Vim、Emacs 和 Notepad++ 都是流行的文本编辑器,通常程序员们会
89
89
90
90
==== 检查配置信息
91
91
92
- 如果想要检查你的配置,可以使用 `git config --list` 命令来列出所有 Git 当时能找到的配置。
92
+ 如果想要检查你的配置,可以使用 `git config --list` 命令来列出所有 Git 当时能找到的配置:
93
93
94
94
[source,console]
95
95
----
@@ -106,7 +106,7 @@ color.diff=auto
106
106
你可能会看到重复的变量名,因为 Git 会从不同的文件中读取同一个配置(例如:`/etc/gitconfig` 与 `~/.gitconfig`)。
107
107
这种情况下,Git 会使用它找到的每一个变量的最后一个配置。
108
108
109
- 你可以通过输入 `git config <key>`:(((git commands, config))) 来检查 Git 的某一项配置
109
+ 你可以通过输入 `git config <key>`:(((git commands, config))) 来检查 Git 的某一项配置:
110
110
111
111
[source,console]
112
112
----
You can’t perform that action at this time.
0 commit comments