Skip to content

Lacking a name for the fourth G-f-W config file #2348

Closed
@PhilipOakley

Description

@PhilipOakley

Git for Windows will search four config files, which is one more that on Linux (--local, --system, --global). This means users can't easily find the content of that 'hidden' file because, as yet it doesn't have a name. (see also #2304 4-Oct-19)

This is on my todo list but folks can chip in...

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.23.0.windows.1.21.g947f504ebe8.dirty
cpu: x86_64
built from commit: 947f504ebe8fc780465d92bde25f3b576bf2f21f
sizeof-long: 4
sizeof-size_t: 8

  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit? (W10 64 bit)
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.17763.775]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: Notepad++
Custom Editor Path:
Path Option: BashOnly
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
Enable Builtin Interactive Add: Enabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

SDK

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Bash

git config -l --show-origin
git config -l --show-origin --local
git config -l --show-origin --system
git config -l --show-origin --global
  • What did you expect to occur after running these commands?

that the first command would only list what was shown in the other three.

  • What actually happened instead?

It listed an extra config location...

file:"C:\ProgramData/Git/config"

Also noted that some of the locations are quoted and others not.

In particular this command from here get's caught for the regular install's 'Program Files' directory.

git config --list --show-origin | awk '{print $1}' | uniq

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions