-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
There's no existing/similar bug report.
- I have searched the existing issues
This report is about a single actionable bug.
- I'm reporting a single actionable bug
This report is about the ProGit book, version 2, English language.
- This bug is not about a translation or old version
Bug covers book website/pdf
- I confirm the bug is about the book as found on the website/pdf
Problem is present in the Pro Git book on the website?
- This bug also affects the Pro Git book as published on the website.
Which version of the book is affected?
Source files
Describe the bug:
On this page, there is the following paragraph (emphasis mine):
On Windows systems, Git looks for the
.gitconfig
file in the$HOME
directory (C:\Users\$USER
for most people). 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. If you are using version 2.x or later of Git for Windows, there is also a system-level config file atC:\Documents and Settings\All Users\Application Data\Git\config
on Windows XP, and inC:\ProgramData\Git\config
on Windows Vista and newer. This config file can only be changed bygit config -f <file>
as an admin.
As of git-for-windows/git#2358, this is incorrect. As described in the release notes:
Note! As a consequence of making
git config --system
work as expected, the location of the system config is nowC:\Program Files\Git\etc\gitconfig
(no longer split betweenC:\Program Files\Git\mingw64\etc\gitconfig
andC:\ProgramData\Git\config
), and likewise the location of the system gitattributes is nowC:\Program Files\Git\etc\gitattributes
(no longerC:\Program Files\Git\mingw64\etc\gitattributes
). Any manual modifications toC:\ProgramData\Git\config
need to be ported manually.
Steps to reproduce:
- Go to https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup
- Read text :)
Expected behavior:
I think we could change this to say something like:
On Windows systems, Git looks for the global
.gitconfig
file in the%USERPROFILE%
directory (C:\Users\%USERNAME%
for most people). It also looks for the system config file at[path]/etc/gitconfig
, where[path]
is wherever Git was installed on your system. If you are using Git for Windows version between v2.0.0 and v2.23.0, there is also a secondary system-level config file at%PROGRAMDATA%\Git\config
(C:\Documents and Settings\All Users\Application Data\Git\config
on Windows XP, orC:\ProgramData\Git\config
on Windows Vista and newer). This config file can only be changed bygit config -f <file>
as an admin.
Or we could simply ignore versions of GFW that are 2+ years old:
On Windows systems, Git looks for the global
.gitconfig
file in the%USERPROFILE%
directory (C:\Users\%USERNAME%
for most people). It also looks for the system config file at[path]/etc/gitconfig
, where[path]
is wherever Git was installed on your system.
Screenshots:
No response
Additional context:
No response
Device
No response
Operating system
No response
Browser/application + version
No response