@@ -136,7 +136,7 @@ Git 内置了相当完整的跟踪信息,你需要做的就是把它们打开
136
136
*`GIT_TRACE`* controls general traces, which don't fit into any specific category.
137
137
This includes the expansion of aliases, and delegation to other sub-programs.
138
138
139
- [source, console]
139
+ [source, console]
140
140
----
141
141
$ GIT_TRACE=true git lga
142
142
20:12:49.877982 git.c:554 trace: exec: 'git-lga'
@@ -150,7 +150,7 @@ $ GIT_TRACE=true git lga
150
150
*`GIT_TRACE_PACK_ACCESS`* 控制访问打包文件的跟踪信息
151
151
第一个字段是被访问的打包文件,第二个是文件的偏移量:
152
152
153
- [source, console]
153
+ [source, console]
154
154
----
155
155
$ GIT_TRACE_PACK_ACCESS=true git status
156
156
20:10:12.081397 sha1_file.c:2088 .git/objects/pack/pack-c3fa...291e.pack 12
@@ -166,7 +166,7 @@ nothing to commit, working directory clean
166
166
167
167
*`GIT_TRACE_PACKET`* 打开网络操作包级别的跟踪信息
168
168
169
- [source, console]
169
+ [source, console]
170
170
----
171
171
$ GIT_TRACE_PACKET=true git ls-remote origin
172
172
20:15:14.867043 pkt-line.c:46 packet: git< # service=git-upload-pack
@@ -180,7 +180,7 @@ $ GIT_TRACE_PACKET=true git ls-remote origin
180
180
*`GIT_TRACE_PERFORMANCE`* 控制性能数据的日志打印。
181
181
输出显示了每个 Git 调用花费的时间。
182
182
183
- [source, console]
183
+ [source, console]
184
184
----
185
185
$ GIT_TRACE_PERFORMANCE=true git gc
186
186
20:18:19.499676 trace.c:414 performance: 0.374835000 s: git command: 'git' 'pack-refs' '--all' '--prune'
@@ -202,7 +202,7 @@ Checking connectivity: 170994, done.
202
202
203
203
*`GIT_TRACE_SETUP`* 显示 Git 发现的关于版本库和交互环境的信息
204
204
205
- [source, console]
205
+ [source, console]
206
206
----
207
207
$ GIT_TRACE_SETUP=true git status
208
208
20:19:47.086765 trace.c:315 setup: git_dir: .git
@@ -235,7 +235,7 @@ nothing to commit, working directory clean
235
235
*`GIT_REFLOG_ACTION`* 让你可以指定描述性的文字写到 reflog 中。
236
236
这儿有一个栗子:
237
237
238
- [source, console]
238
+ [source, console]
239
239
----
240
240
$ GIT_REFLOG_ACTION="my action" git commit --allow-empty -m 'my message'
241
241
[master 9e3d55a] my message
0 commit comments