Skip to content

Commit ce1a036

Browse files
committed
Change /etc/gitconfig -> [path]/etc/gitconfig
Closes #506
1 parent 58e65f7 commit ce1a036

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

book/01-introduction/sections/first-time-setup.asc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ You can also change them at any time by running through the commands again.
88
Git comes with a tool called `git config` that lets you get and set configuration variables that control all aspects of how Git looks and operates.(((git commands, config)))
99
These variables can be stored in three different places:
1010

11-
1. `/etc/gitconfig` file: Contains values applied to every user on the system and all their repositories.
11+
1. `[path]/etc/gitconfig` file: Contains values applied to every user on the system and all their repositories.
1212
If you pass the option `--system` to `git config`, it reads and writes from this file specifically.
1313
Because this is a system configuration file, you would need administrative or superuser privilege to make changes to it.
1414
2. `~/.gitconfig` or `~/.config/git/config` file: Values specific personally to you, the user.
@@ -17,10 +17,10 @@ These variables can be stored in three different places:
1717
You can force Git to read from and write to this file with the `--local` option, but that is in fact the default.
1818
Unsurprisingly, you need to be located somewhere in a Git repository for this option to work properly.
1919

20-
Each level overrides values in the previous level, so values in `.git/config` trump those in `/etc/gitconfig`.
20+
Each level overrides values in the previous level, so values in `.git/config` trump those in `[path]/etc/gitconfig`.
2121

2222
On Windows systems, Git looks for the `.gitconfig` file in the `$HOME` directory (`C:\Users\$USER` for most people).
23-
It also still looks for `/etc/gitconfig`, although it's relative to the MSys root, which is wherever you decide to install Git on your Windows system when you run the installer.
23+
It also still looks for `[path]/etc/gitconfig`, although it's relative to the MSys root, which is wherever you decide to install Git on your Windows system when you run the installer.
2424
If you are using version 2.x or later of Git for Windows, there is also a system-level config file at
2525
`C:\Documents and Settings\All Users\Application Data\Git\config` on Windows XP, and in `C:\ProgramData\Git\config` on Windows Vista and newer.
2626
This config file can only be changed by `git config -f <file>` as an admin.
@@ -100,7 +100,7 @@ color.diff=auto
100100
...
101101
----
102102

103-
You may see keys more than once, because Git reads the same key from different files (`/etc/gitconfig` and `~/.gitconfig`, for example).
103+
You may see keys more than once, because Git reads the same key from different files (`[path]/etc/gitconfig` and `~/.gitconfig`, for example).
104104
In this case, Git uses the last value for each unique key it sees.
105105

106106
You can also check what Git thinks a specific key's value is by typing `git config <key>`:(((git commands, config)))

book/08-customizing-git/sections/config.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $ git config --global user.email [email protected]
1414
Now you'll learn a few of the more interesting options that you can set in this manner to customize your Git usage.
1515

1616
First, a quick review: Git uses a series of configuration files to determine non-default behavior that you may want.
17-
The first place Git looks for these values is in the system-wide `/etc/gitconfig` file, which contains settings that are applied to every user on the system and all of their repositories.
17+
The first place Git looks for these values is in the system-wide `[path]/etc/gitconfig` file, which contains settings that are applied to every user on the system and all of their repositories.
1818
If you pass the option `--system` to `git config`, it reads and writes from this file specifically.
1919

2020
The next place Git looks is the `~/.gitconfig` (or `~/.config/git/config`) file, which is specific to each user.
@@ -24,7 +24,7 @@ Finally, Git looks for configuration values in the configuration file in the Git
2424
These values are specific to that single repository, and represent passing the `--local` option to `git config`.
2525
If you don't specify which level you want to work with, this is the default.
2626

27-
Each of these ``levels'' (system, global, local) overwrites values in the previous level, so values in `.git/config` trump those in `/etc/gitconfig`, for instance.
27+
Each of these ``levels'' (system, global, local) overwrites values in the previous level, so values in `.git/config` trump those in `[path]/etc/gitconfig`, for instance.
2828

2929
[NOTE]
3030
====

0 commit comments

Comments
 (0)