You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide user config defaults for UI-changeable settings (#4717)
As discussed in #4602, we make a general change to how we treat UI
settings that can be changed from within lazygit; previously, the rule
was to persist them in State.yml so that they automatically remember the
last value that was set in the UI; now, we no longer do this, and
instead provide user configs for setting defaults which we fall back to
on every start.
See #4602 for an in-depth discussion about the pros and cons of either
approach, and why we chose this one.
As part of this, we change the default for the sort order of branches to
date (aka committerdate), both for local and for remote branches (was
recency and alphabetical before, respectively). See the discussion
starting
[here](#2147 (comment))
for some reasons.
Fixes#4602.
# If true, git diffs are rendered with the `--ignore-all-space` flag, which ignores whitespace changes. Can be toggled from within Lazygit with `<c-w>`.
370
+
ignoreWhitespaceInDiffView: false
371
+
372
+
# The number of lines of context to show around each diff hunk. Can be changed from within Lazygit with the `{` and `}` keys.
373
+
diffContextSize: 3
374
+
375
+
# The threshold for considering a file to be renamed, in percent. Can be changed from within Lazygit with the `(` and `)` keys.
376
+
renameSimilarityThreshold: 50
377
+
369
378
# If true, do not spawn a separate process when using GPG
370
379
overrideGpg: false
371
380
@@ -387,9 +396,32 @@ git:
387
396
388
397
# Config for showing the log in the commits view
389
398
log:
399
+
# One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'
400
+
# 'topo-order' makes it easier to read the git log graph, but commits may not
401
+
# appear chronologically. See https://git-scm.com/docs/
402
+
#
403
+
# Can be changed from within Lazygit with `Log menu -> Commit sort order` (`<c-l>` in the commits window by default).
404
+
order: topo-order
405
+
406
+
# This determines whether the git graph is rendered in the commits panel
407
+
# One of 'always' | 'never' | 'when-maximised'
408
+
#
409
+
# Can be toggled from within lazygit with `Log menu -> Show git graph` (`<c-l>` in the commits window by default).
410
+
showGraph: always
411
+
390
412
# displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`)
391
413
showWholeGraph: false
392
414
415
+
# How branches are sorted in the local branches view.
416
+
# One of: 'date' (default) | 'recency' | 'alphabetical'
417
+
# Can be changed from within Lazygit with the Sort Order menu (`s`) in the branches panel.
418
+
localBranchSortOrder: date
419
+
420
+
# How branches are sorted in the remote branches view.
421
+
# One of: 'date' (default) | 'alphabetical'
422
+
# Can be changed from within Lazygit with the Sort Order menu (`s`) in the remote branches panel.
423
+
remoteBranchSortOrder: date
424
+
393
425
# When copying commit hashes to the clipboard, truncate them to this
Copy file name to clipboardExpand all lines: docs/keybindings/Keybindings_en.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,10 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
14
14
|`` @ ``| View command log options | View options for the command log e.g. show/hide the command log and focus the command log. |
15
15
|`` P ``| Push | Push the current branch to its upstream branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
16
16
|`` p ``| Pull | Pull changes from the remote for the current branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
17
-
|`` ) ``| Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename. |
18
-
|`` ( ``| Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
19
-
|`` } ``| Increase diff context size | Increase the amount of the context shown around changes in the diff view. |
20
-
|`` { ``| Decrease diff context size | Decrease the amount of the context shown around changes in the diff view. |
17
+
|`` ) ``| Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'.|
18
+
|`` ( ``| Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'.|
19
+
|`` } ``| Increase diff context size | Increase the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'.|
20
+
|`` { ``| Decrease diff context size | Decrease the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'.|
21
21
|`` : ``| Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
22
22
|`` <c-p> ``| View custom patch options ||
23
23
|`` m ``| View merge/rebase options | View options to abort/continue/skip the current merge/rebase. |
@@ -30,7 +30,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
30
30
|`` <c-e> ``| View diffing options | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. |
31
31
|`` q ``| Quit ||
32
32
|`` <esc> ``| Cancel ||
33
-
|`` <c-w> ``| Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view. |
33
+
|`` <c-w> ``| Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'.|
34
34
|`` z ``| Undo | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
35
35
|`` <c-z> ``| Redo | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
36
36
@@ -65,7 +65,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
65
65
|`` <space> ``| Toggle file included in patch | Toggle whether the file is included in the custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches.|
66
66
|`` a ``| Toggle all files | Add/remove all commit's files to custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches.|
67
67
|`` <enter> ``| Enter file / Toggle directory collapsed | If a file is selected, enter the file so that you can add/remove individual lines to the custom patch. If a directory is selected, toggle the directory. |
68
-
|`` ` ``| Toggle file tree view | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
68
+
|`` ` ``| Toggle file tree view | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'.|
69
69
|`` - ``| Collapse all files | Collapse all directories in the files tree |
70
70
|`` = ``| Expand all files | Expand all directories in the file tree |
71
71
|`` 0 ``| Focus main view ||
@@ -149,7 +149,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
149
149
|`` d ``| Discard | View options for discarding changes to the selected file. |
150
150
|`` g ``| View upstream reset options ||
151
151
|`` D ``| Reset | View reset options for working tree (e.g. nuking the working tree). |
152
-
|`` ` ``| Toggle file tree view | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
152
+
|`` ` ``| Toggle file tree view | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'.|
153
153
|`` <c-t> ``| Open external diff tool (git difftool) ||
154
154
|`` M ``| Open external merge tool | Run `git mergetool`. |
Copy file name to clipboardExpand all lines: docs/keybindings/Keybindings_ko.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,10 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
14
14
|`` @ ``| 명령어 로그 메뉴 열기 | View options for the command log e.g. show/hide the command log and focus the command log. |
15
15
|`` P ``| 푸시 | Push the current branch to its upstream branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
16
16
|`` p ``| 업데이트 | Pull changes from the remote for the current branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
17
-
|`` ) ``| Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename. |
18
-
|`` ( ``| Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
19
-
|`` } ``| Diff 보기의 변경 사항 주위에 표시되는 컨텍스트의 크기를 늘리기 | Increase the amount of the context shown around changes in the diff view. |
20
-
|`` { ``| Diff 보기의 변경 사항 주위에 표시되는 컨텍스트 크기 줄이기 | Decrease the amount of the context shown around changes in the diff view. |
17
+
|`` ) ``| Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'.|
18
+
|`` ( ``| Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'.|
19
+
|`` } ``| Diff 보기의 변경 사항 주위에 표시되는 컨텍스트의 크기를 늘리기 | Increase the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'.|
20
+
|`` { ``| Diff 보기의 변경 사항 주위에 표시되는 컨텍스트 크기 줄이기 | Decrease the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'.|
21
21
|`` : ``| Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
22
22
|`` <c-p> ``| 커스텀 Patch 옵션 보기 ||
23
23
|`` m ``| View merge/rebase options | View options to abort/continue/skip the current merge/rebase. |
@@ -30,7 +30,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
30
30
|`` <c-e> ``| Diff 메뉴 열기 | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. |
31
31
|`` q ``| 종료 ||
32
32
|`` <esc> ``| 취소 ||
33
-
|`` <c-w> ``| 공백문자를 Diff 뷰에서 표시 여부 전환 | Toggle whether or not whitespace changes are shown in the diff view. |
33
+
|`` <c-w> ``| 공백문자를 Diff 뷰에서 표시 여부 전환 | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'.|
34
34
|`` z ``| 되돌리기 (reflog) (실험적) | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
35
35
|`` <c-z> ``| 다시 실행 (reflog) (실험적) | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
36
36
@@ -331,7 +331,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
331
331
|`` <space> ``| Toggle file included in patch | Toggle whether the file is included in the custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches.|
332
332
|`` a ``| Toggle all files included in patch | Add/remove all commit's files to custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches.|
333
333
|`` <enter> ``| Enter file to add selected lines to the patch (or toggle directory collapsed) | If a file is selected, enter the file so that you can add/remove individual lines to the custom patch. If a directory is selected, toggle the directory. |
334
-
|`` ` ``| 파일 트리뷰로 전환 | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
334
+
|`` ` ``| 파일 트리뷰로 전환 | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'.|
335
335
|`` - ``| Collapse all files | Collapse all directories in the files tree |
336
336
|`` = ``| Expand all files | Expand all directories in the file tree |
337
337
|`` 0 ``| Focus main view ||
@@ -384,7 +384,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
384
384
|`` d ``| View 'discard changes' options | View options for discarding changes to the selected file. |
385
385
|`` g ``| View upstream reset options ||
386
386
|`` D ``| 초기화 | View reset options for working tree (e.g. nuking the working tree). |
387
-
|`` ` ``| 파일 트리뷰로 전환 | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
387
+
|`` ` ``| 파일 트리뷰로 전환 | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'.|
388
388
|`` <c-t> ``| Open external diff tool (git difftool) ||
389
389
|`` M ``| Git mergetool를 열기 | Run `git mergetool`. |
Copy file name to clipboardExpand all lines: docs/keybindings/Keybindings_nl.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,10 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
14
14
|`` @ ``| View command log options | View options for the command log e.g. show/hide the command log and focus the command log. |
15
15
|`` P ``| Push | Push the current branch to its upstream branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
16
16
|`` p ``| Pull | Pull changes from the remote for the current branch. If no upstream is configured, you will be prompted to configure an upstream branch. |
17
-
|`` ) ``| Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename. |
18
-
|`` ( ``| Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
19
-
|`` } ``| Increase diff context size | Increase the amount of the context shown around changes in the diff view. |
20
-
|`` { ``| Decrease diff context size | Decrease the amount of the context shown around changes in the diff view. |
17
+
|`` ) ``| Increase rename similarity threshold | Increase the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'.|
18
+
|`` ( ``| Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'.|
19
+
|`` } ``| Increase diff context size | Increase the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'.|
20
+
|`` { ``| Decrease diff context size | Decrease the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'.|
21
21
|`` : ``| Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
22
22
|`` <c-p> ``| Bekijk aangepaste patch opties ||
23
23
|`` m ``| Bekijk merge/rebase opties | View options to abort/continue/skip the current merge/rebase. |
@@ -30,7 +30,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
30
30
|`` <c-e> ``| Open diff menu | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. |
31
31
|`` q ``| Quit ||
32
32
|`` <esc> ``| Annuleren ||
33
-
|`` <c-w> ``| Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view. |
33
+
|`` <c-w> ``| Toggle whitespace | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'.|
34
34
|`` z ``| Ongedaan maken (via reflog) (experimenteel) | The reflog will be used to determine what git command to run to undo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
35
35
|`` <c-z> ``| Redo (via reflog) (experimenteel) | The reflog will be used to determine what git command to run to redo the last git command. This does not include changes to the working tree; only commits are taken into consideration. |
36
36
@@ -75,7 +75,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
75
75
|`` d ``| Bekijk 'veranderingen ongedaan maken' opties | View options for discarding changes to the selected file. |
76
76
|`` g ``| Bekijk upstream reset opties ||
77
77
|`` D ``| Reset | View reset options for working tree (e.g. nuking the working tree). |
78
-
|`` ` ``| Toggle bestandsboom weergave | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
78
+
|`` ` ``| Toggle bestandsboom weergave | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'.|
79
79
|`` <c-t> ``| Open external diff tool (git difftool) ||
80
80
|`` M ``| Open external merge tool | Run `git mergetool`. |
81
81
|`` f ``| Fetch | Fetch changes from remote. |
@@ -141,7 +141,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
141
141
|`` <space> ``| Toggle bestand inbegrepen in patch | Toggle whether the file is included in the custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches.|
142
142
|`` a ``| Toggle all files | Add/remove all commit's files to custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches.|
143
143
|`` <enter> ``| Enter bestand om geselecteerde regels toe te voegen aan de patch | If a file is selected, enter the file so that you can add/remove individual lines to the custom patch. If a directory is selected, toggle the directory. |
144
-
|`` ` ``| Toggle bestandsboom weergave | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory. |
144
+
|`` ` ``| Toggle bestandsboom weergave | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'.|
145
145
|`` - ``| Collapse all files | Collapse all directories in the files tree |
146
146
|`` = ``| Expand all files | Expand all directories in the file tree |
0 commit comments