+config paths for Debian, & +command to view all configs#1129
Closed
TopView wants to merge 1 commit intoprogit:masterfrom
Closed
+config paths for Debian, & +command to view all configs#1129TopView wants to merge 1 commit intoprogit:masterfrom
TopView wants to merge 1 commit intoprogit:masterfrom
Conversation
The config paths as they were didn't work for me on Debian Stretch. So added paths for them. Also added a command to show all current settings and where they're coming from. Ref: https://stackoverflow.com/questions/2114111/where-does-git-config-global-get-written-to Also paralleled text for 3 items, and bold faced heading for Windows.
jnavila
requested changes
Mar 14, 2019
| These variables can be stored in three different places: | ||
|
|
||
| 1. `/etc/gitconfig` file: Contains values applied to every user on the system and all their repositories. | ||
| 1. `/etc/gitconfig` (/usr/local/etc/gitconfig on Debian): Contains values applied to every user on the system and all their repositories. |
Member
There was a problem hiding this comment.
utterly false, Debian is no different:
$ sudo /usr/bin/git config --system --add foo.bar foo
$ cat /etc/gitconfig
[foo]
bar = foo| If you pass the option `--system` to `git config`, it reads and writes from this file specifically. | ||
| (Because this is a system configuration file, you would need administrative or superuser privilege to make changes to it.) | ||
| 2. `~/.gitconfig` or `~/.config/git/config` file: Values specific personally to you, the user. | ||
| 2. `~/.gitconfig` or `~/.config/git/config` (note ~ is root's home dir): Contains values specific personally to you, the user. |
Member
There was a problem hiding this comment.
Only if the current user is root (which should not happen), otherwise, it's current user's home dir.
| $sudo git config --list --show-origin | ||
| ---- | ||
|
|
||
| *Windows:* Git looks for the `.gitconfig` file in the `$HOME` directory (`C:\Users\$USER` for most people). |
Member
There was a problem hiding this comment.
The same as for Linux users, so I guess it's useless to specify the case of Windows.
| [source,console] | ||
| ---- | ||
| $sudo git config --list --show-origin | ||
| ---- |
aollier
reviewed
Mar 30, 2019
|
|
||
| [source,console] | ||
| ---- | ||
| $sudo git config --list --show-origin |
Contributor
There was a problem hiding this comment.
git config need not to be run with su privileges.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The config paths as they were didn't work for me on Debian Stretch. So added paths for them.
Also added a command to show all current settings and where they're coming from. Ref: https://stackoverflow.com/questions/2114111/where-does-git-config-global-get-written-to
Also paralleled text for 3 items, and bold faced heading for Windows.