@@ -206,12 +206,8 @@ FILES
206
206
If not set explicitly with '--file', there are four files where
207
207
'git config' will search for configuration options:
208
208
209
- $GIT_DIR/config::
210
- Repository specific configuration file.
211
-
212
- ~/.gitconfig::
213
- User-specific configuration file. Also called "global"
214
- configuration file.
209
+ $(prefix)/etc/gitconfig::
210
+ System-wide configuration file.
215
211
216
212
$XDG_CONFIG_HOME/git/config::
217
213
Second user-specific configuration file. If $XDG_CONFIG_HOME is not set
@@ -221,15 +217,23 @@ $XDG_CONFIG_HOME/git/config::
221
217
you sometimes use older versions of Git, as support for this
222
218
file was added fairly recently.
223
219
224
- $(prefix)/etc/gitconfig::
225
- System-wide configuration file.
220
+ ~/.gitconfig::
221
+ User-specific configuration file. Also called "global"
222
+ configuration file.
223
+
224
+ $GIT_DIR/config::
225
+ Repository specific configuration file.
226
226
227
227
If no further options are given, all reading options will read all of these
228
228
files that are available. If the global or the system-wide configuration
229
229
file are not available they will be ignored. If the repository configuration
230
230
file is not available or readable, 'git config' will exit with a non-zero
231
231
error code. However, in neither case will an error message be issued.
232
232
233
+ The files are read in the order given above, with last value found taking
234
+ precedence over values read earlier. When multiple values are taken then all
235
+ values of a key from all files will be used.
236
+
233
237
All writing options will per default write to the repository specific
234
238
configuration file. Note that this also affects options like '--replace-all'
235
239
and '--unset'. *'git config' will only ever change one file at a time*.
0 commit comments