blob: 57c896558787711b3b4d03534bd8f18f480a3c19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# git
The global git config (`~/.gitconfig`), every key, reached from the user
page's "More git settings" button. Back returns to the user page.
One row per value, grouped by section in file order, so a key set several
times shows several rows. Enter saves a row, Escape undoes an edit, Remove
drops that one value, and the Add row takes `section.key` and a value.
"Edit in editor" opens the file in Sublime Text.
`gitcfg` does every read and write, through `git config`, so the file keeps
its comments and layout. `--fixed-value` makes a write touch one value of a
multi-valued key. `set` and `unset` first check the old value is still
there, because `--replace-all` with no match appends instead of failing, and
the file may have changed in the editor. After every write the page reads
the list again; a failure shows git's reason under its row.
Checks: `./test-gitcfg.sh` (a throwaway `GIT_CONFIG_GLOBAL`) and
`node desktop/modules/git/test_git.js`.
Not here: per-repository, system and `[include]`d configs. A value holding a
newline edits on one line; use the editor for those.
|