Skip to content

Commit a0e81c9

Browse files
authored
Update docs and schema for release (#5168)
2 parents 0bd4111 + 7d142df commit a0e81c9

File tree

4 files changed

+82
-49
lines changed

4 files changed

+82
-49
lines changed

docs/Config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ services:
10781078
Where:
10791079

10801080
- `gitDomain` stands for the domain used by git itself (i.e. the one present on clone URLs), e.g. `git.work.com`
1081-
- `provider` is one of `github`, `bitbucket`, `bitbucketServer`, `azuredevops`, `gitlab` or `gitea`
1081+
- `provider` is one of `github`, `bitbucket`, `bitbucketServer`, `azuredevops`, `gitlab`, `gitea` or `codeberg`
10821082
- `webDomain` is the URL where your git service exposes a web interface and APIs, e.g. `gitservice.work.com`
10831083

10841084
## Predefined commit message prefix

docs/Custom_Command_Keybindings.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ The permitted option fields are:
192192
| name | The first part of the label | no |
193193
| description | The second part of the label | no |
194194
| value | the value that will be used in the command | yes |
195+
| key | Keybinding to invoke this menu option without needing to navigate to it. Can be a single letter or one of the values from [here](https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md) | no |
195196

196197
If an option has no name the value will be displayed to the user in place of the name, so you're allowed to only include the value like so:
197198

@@ -233,6 +234,34 @@ customCommands:
233234
description: 'branch for a release'
234235
```
235236

237+
Here's an example of supplying keybindings for menu options:
238+
239+
```yml
240+
customCommands:
241+
- key: 'a'
242+
command: 'echo {{.Form.BranchType | quote}}'
243+
context: 'commits'
244+
prompts:
245+
- type: 'menu'
246+
title: 'What kind of branch is it?'
247+
key: 'BranchType'
248+
options:
249+
- value: 'feature'
250+
name: 'feature branch'
251+
description: 'branch based off develop'
252+
key: 'f'
253+
- value: 'hotfix'
254+
name: 'hotfix branch'
255+
description: 'branch based off main for fast bug fixes'
256+
key: 'h'
257+
- value: 'release'
258+
name: 'release branch'
259+
description: 'branch for a release'
260+
key: 'r'
261+
```
262+
263+
In this example, pressing 'f', 'h', or 'r' will directly select the corresponding option without needing to navigate to it first.
264+
236265
### Menu-from-command
237266

238267
| _field_ | _description_ | _required_ |

docs/keybindings/Keybindings_zh-CN.md

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
1414
| `` @ `` | 打开命令日志菜单 | 查看命令日志的选项,例如显示/隐藏命令日志以及聚焦命令日志 |
1515
| `` P `` | 推送 | 推送当前分支到它的上游。如果上游未配置,您可以在弹窗中配置上游分支。 |
1616
| `` p `` | 拉取 | 从当前分支的远程分支获取改动。如果上游未配置,您可以在弹窗中配置上游分支。 |
17-
| `` ) `` | 提高重命名相似度阈值 | 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 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 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 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'. |
17+
| `` ) `` | 提高重命名相似度阈值 | 提高将删除和添加对视为重命名所需的相似度阈值。<br><br>默认值可在配置文件中通过键 'git.renameSimilarityThreshold' 更改。 |
18+
| `` ( `` | 降低重命名相似度阈值 | 降低将删除和添加对视为重命名所需的相似度阈值。<br><br>默认值可在配置文件中通过键 'git.renameSimilarityThreshold' 更改。 |
19+
| `` } `` | 扩大差异视图中显示的上下文范围 | 增加差异视图中变更周围显示的上下文量。<br><br>默认值可在配置文件中通过键 'git.diffContextSize' 更改。 |
20+
| `` { `` | 缩小差异视图中显示的上下文范围 | 减少差异视图中变更周围显示的上下文量。<br><br>默认值可在配置文件中通过键 'git.diffContextSize' 更改。 |
2121
| `` : `` | 执行 Shell 命令 | 调出可输入shell命令执行的提示符。 |
2222
| `` <c-p> `` | 查看自定义补丁选项 | |
2323
| `` m `` | 查看合并/变基选项 | 查看当前合并或变基的中止、继续、跳过选项 |
24-
| `` R `` | 刷新 | 刷新git状态(即在后台上运行`git status`,`git branch`等命令以更新面板内容) 不会运行`git fetch` |
24+
| `` R `` | 刷新 | 刷新Git状态(即在后台运行`git status``git branch`等命令以更新面板内容)。此操作不会执行`git fetch` |
2525
| `` + `` | 下一屏模式(正常/半屏/全屏) | |
2626
| `` _ `` | 上一屏模式 | |
27-
| `` \| `` | Cycle pagers | Choose the next pager in the list of configured pagers |
27+
| `` \| `` | 切换分页器 | 从已配置的分页器列表中选择下一个分页器 |
2828
| `` <esc> `` | 取消 | |
2929
| `` ? `` | 打开菜单 | |
3030
| `` <c-s> `` | 查看按路径过滤选项 | 查看用于过滤提交日志的选项,以便仅显示与过滤器匹配的提交。 |
3131
| `` W `` | 打开 diff 菜单 | 查看与比较两个引用相关的选项,例如与选定的 ref 进行比较,输入要比较的 ref,然后反转比较方向。 |
3232
| `` <c-e> `` | 打开 diff 菜单 | 查看与比较两个引用相关的选项,例如与选定的 ref 进行比较,输入要比较的 ref,然后反转比较方向。 |
3333
| `` q `` | 退出 | |
34-
| `` <c-z> `` | Suspend the application | |
35-
| `` <c-w> `` | 切换是否在差异视图中显示空白字符差异 | 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+
| `` <c-z> `` | 挂起应用程序 | |
35+
| `` <c-w> `` | 切换是否在差异视图中显示空白字符差异 | 切换是否在差异视图中显示空白字符更改。<br><br>默认值可在配置文件中通过键 'git.ignoreWhitespaceInDiffView' 更改。 |
3636
| `` z `` | 撤销 | Reflog将用于确定运行哪个git命令来撤消最后一个git命令。这并不包括对工作树的更改,只考虑提交。 |
3737
| `` Z `` | 重做 | Reflog将用于确定运行哪个git命令来重做上一个git命令。这并不包括对工作树的更改,只考虑提交。 |
3838

@@ -53,33 +53,6 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
5353
| `` ] `` | 下一个标签 | |
5454
| `` [ `` | 上一个标签 | |
5555

56-
## Input prompt
57-
58-
| Key | Action | Info |
59-
|-----|--------|-------------|
60-
| `` <enter> `` | 确认 | |
61-
| `` <esc> `` | 关闭 | |
62-
63-
## Reflog
64-
65-
| Key | Action | Info |
66-
|-----|--------|-------------|
67-
| `` <c-o> `` | 复制提交哈希到剪贴板 | |
68-
| `` <space> `` | 检出 | 检出所选择的提交作为分离HEAD。 |
69-
| `` y `` | 复制提交属性到剪贴板 | 复制提交属性到剪贴板(如hash、URL、diff、消息、作者)。 |
70-
| `` o `` | 在浏览器中打开提交 | |
71-
| `` n `` | 从提交创建新分支 | |
72-
| `` N `` | 移动提交至新分支 | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.<br><br>Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
73-
| `` g `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 |
74-
| `` C `` | 复制提交(拣选) | 标记提交为已复制。然后,在本地提交视图中,您可以按 `V` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `<esc>` 来取消选择。 |
75-
| `` <c-r> `` | 重置已拣选(复制)的提交 | |
76-
| `` <c-t> `` | 使用外部差异比较工具(git difftool) | |
77-
| `` * `` | 选择当前分支的提交 | |
78-
| `` 0 `` | 聚焦主视图 | |
79-
| `` <enter> `` | 查看提交 | |
80-
| `` w `` | 查看工作区选项 | |
81-
| `` / `` | 通过文本过滤当前视图 | |
82-
8356
## 子提交
8457

8558
| Key | Action | Info |
@@ -89,7 +62,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
8962
| `` y `` | 复制提交属性到剪贴板 | 复制提交属性到剪贴板(如hash、URL、diff、消息、作者)。 |
9063
| `` o `` | 在浏览器中打开提交 | |
9164
| `` n `` | 从提交创建新分支 | |
92-
| `` N `` | 移动提交至新分支 | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.<br><br>Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
65+
| `` N `` | 移动提交至新分支 | 创建一个新分支,并将当前分支未推送的提交移动到该分支。如果您打算开始新工作但忘记先创建新分支,这会很有用。<br><br>请注意,此操作忽略选择,新分支总是从主分支创建或堆叠在当前分支之上(您可以选择哪种方式)。 |
9366
| `` g `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 |
9467
| `` C `` | 复制提交(拣选) | 标记提交为已复制。然后,在本地提交视图中,您可以按 `V` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `<esc>` 来取消选择。 |
9568
| `` <c-r> `` | 重置已拣选(复制)的提交 | |
@@ -124,6 +97,26 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
12497
| `` d `` | 删除 | 删除选定的工作树。这将删除工作树的目录以及 .git 目录中有关工作树的元数据。 |
12598
| `` / `` | 通过文本过滤当前视图 | |
12699

100+
## 引用日志
101+
102+
| Key | Action | Info |
103+
|-----|--------|-------------|
104+
| `` <c-o> `` | 复制提交哈希到剪贴板 | |
105+
| `` <space> `` | 检出 | 检出所选择的提交作为分离HEAD。 |
106+
| `` y `` | 复制提交属性到剪贴板 | 复制提交属性到剪贴板(如hash、URL、diff、消息、作者)。 |
107+
| `` o `` | 在浏览器中打开提交 | |
108+
| `` n `` | 从提交创建新分支 | |
109+
| `` N `` | 移动提交至新分支 | 创建一个新分支,并将当前分支未推送的提交移动到该分支。如果您打算开始新工作但忘记先创建新分支,这会很有用。<br><br>请注意,此操作忽略选择,新分支总是从主分支创建或堆叠在当前分支之上(您可以选择哪种方式)。 |
110+
| `` g `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 |
111+
| `` C `` | 复制提交(拣选) | 标记提交为已复制。然后,在本地提交视图中,您可以按 `V` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `<esc>` 来取消选择。 |
112+
| `` <c-r> `` | 重置已拣选(复制)的提交 | |
113+
| `` <c-t> `` | 使用外部差异比较工具(git difftool) | |
114+
| `` * `` | 选择当前分支的提交 | |
115+
| `` 0 `` | 聚焦主视图 | |
116+
| `` <enter> `` | 查看提交 | |
117+
| `` w `` | 查看工作区选项 | |
118+
| `` / `` | 通过文本过滤当前视图 | |
119+
127120
## 提交
128121

129122
| Key | Action | Info |
@@ -154,7 +147,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
154147
| `` y `` | 复制提交属性到剪贴板 | 复制提交属性到剪贴板(如hash、URL、diff、消息、作者)。 |
155148
| `` o `` | 在浏览器中打开提交 | |
156149
| `` n `` | 从提交创建新分支 | |
157-
| `` N `` | 移动提交至新分支 | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.<br><br>Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
150+
| `` N `` | 移动提交至新分支 | 创建一个新分支,并将当前分支未推送的提交移动到该分支。如果您打算开始新工作但忘记先创建新分支,这会很有用。<br><br>请注意,此操作忽略选择,新分支总是从主分支创建或堆叠在当前分支之上(您可以选择哪种方式)。 |
158151
| `` g `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 |
159152
| `` C `` | 复制提交(拣选) | 标记提交为已复制。然后,在本地提交视图中,您可以按 `V` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `<esc>` 来取消选择。 |
160153
| `` <c-t> `` | 使用外部差异比较工具(git difftool) | |
@@ -180,7 +173,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
180173
| `` c `` | 检出 | 检出文件 |
181174
| `` d `` | 删除 | 放弃对此文件的提交变更 |
182175
| `` o `` | 打开文件 | 使用默认程序打开该文件 |
183-
| `` e `` | 编辑 | 使用外部编辑器打开文件 |
176+
| `` e `` | 编辑(Edit) | 使用外部编辑器打开文件 |
184177
| `` <c-t> `` | 使用外部差异比较工具(git difftool) | |
185178
| `` <space> `` | 补丁中包含的切换文件 | 切换文件是否包含在自定义补丁中。请参阅 https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches。 |
186179
| `` a `` | 操作所有文件 | 添加或删除所有提交中的文件到自定义的补丁中。请参阅 https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches。 |
@@ -204,7 +197,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
204197
| `` A `` | 修补最后一次提交 | |
205198
| `` C `` | 使用 Git 编辑器提交变更 | |
206199
| `` <c-f> `` | 找到用于修复的基准提交 | 找到您当前变更所基于的提交,以便于修正/改进该提交。这样做可以省去您逐一查看分支提交来确定应该修正/改进哪个提交的麻烦。请参阅文档: <https://github.com/jesseduffield/lazygit/tree/master/docs/Fixup_Commits.md> |
207-
| `` e `` | 编辑 | 使用外部编辑器打开文件 |
200+
| `` e `` | 编辑(Edit) | 使用外部编辑器打开文件 |
208201
| `` o `` | 打开文件 | 使用默认程序打开该文件 |
209202
| `` i `` | 忽略文件 | |
210203
| `` r `` | 刷新文件 | |
@@ -217,7 +210,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
217210
| `` D `` | 重置 | 查看工作树的重置选项(例如:清除工作树)。 |
218211
| `` ` `` | 切换文件树视图 | 在平面布局和树布局之间切换文件视图。平面布局在单个列表中显示所有文件路径,树布局按目录分组文件。<br><br>可以在配置文件中使用 'gui.showFileTree' 键更改默认设置。 |
219212
| `` <c-t> `` | 使用外部差异比较工具(git difftool) | |
220-
| `` M `` | View merge conflict options | View options for resolving merge conflicts. |
213+
| `` M `` | 查看合并冲突选项 | 查看用于解决合并冲突的选项。 |
221214
| `` f `` | 抓取 | 从远程获取变更 |
222215
| `` - `` | 折叠全部文件 | 折叠文件树中的全部目录 |
223216
| `` = `` | 展开全部文件 | 展开文件树中的全部目录 |
@@ -232,7 +225,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
232225
| `` i `` | 显示 git-flow 选项 | |
233226
| `` <space> `` | 检出 | 检出选中的项目 |
234227
| `` n `` | 新分支 | |
235-
| `` N `` | 移动提交至新分支 | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.<br><br>Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
228+
| `` N `` | 移动提交至新分支 | 创建一个新分支,并将当前分支未推送的提交移动到该分支。如果您打算开始新工作但忘记先创建新分支,这会很有用。<br><br>请注意,此操作忽略选择,新分支总是从主分支创建或堆叠在当前分支之上(您可以选择哪种方式)。 |
236229
| `` o `` | 创建拉取请求 | |
237230
| `` O `` | 创建拉取请求选项 | |
238231
| `` <c-y> `` | 复制拉取请求 URL 到剪贴板 | |
@@ -261,7 +254,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
261254
| `` <left> `` | 选择上一个区块 | |
262255
| `` <right> `` | 选择下一个区块 | |
263256
| `` v `` | 切换拖动选择 | |
264-
| `` a `` | 切换代码块选择 | Toggle line-by-line vs. hunk selection mode. |
257+
| `` a `` | 切换代码块选择 | 切换逐行选择与代码块选择模式。 |
265258
| `` <c-o> `` | 复制选中文本到剪贴板 | |
266259
| `` o `` | 打开文件 | 使用默认程序打开该文件 |
267260
| `` e `` | 编辑文件 | 使用外部编辑器打开文件 |
@@ -290,7 +283,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
290283
| Key | Action | Info |
291284
|-----|--------|-------------|
292285
| `` <tab> `` | 切换到其他面板 | 切换到其他视图(已暂存/未暂存的变更) |
293-
| `` <esc> `` | Exit back to side panel | |
286+
| `` <esc> `` | 退出回到侧边面板 | |
294287
| `` / `` | 开始搜索 | |
295288

296289
## 正在合并
@@ -306,7 +299,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
306299
| `` z `` | 撤销 | 撤消上次合并冲突解决 |
307300
| `` e `` | 编辑文件 | 使用外部编辑器打开文件 |
308301
| `` o `` | 打开文件 | 使用默认程序打开该文件 |
309-
| `` M `` | View merge conflict options | View options for resolving merge conflicts. |
302+
| `` M `` | 查看合并冲突选项 | 查看用于解决合并冲突的选项。 |
310303
| `` <esc> `` | 返回文件面板 | |
311304

312305
## 正在暂存
@@ -316,7 +309,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
316309
| `` <left> `` | 选择上一个区块 | |
317310
| `` <right> `` | 选择下一个区块 | |
318311
| `` v `` | 切换拖动选择 | |
319-
| `` a `` | 切换代码块选择 | Toggle line-by-line vs. hunk selection mode. |
312+
| `` a `` | 切换代码块选择 | 切换逐行选择与代码块选择模式。 |
320313
| `` <c-o> `` | 复制选中文本到剪贴板 | |
321314
| `` <space> `` | 切换暂存状态 | 切换行暂存状态 |
322315
| `` d `` | 取消变更(git reset) | 当选择未暂存的变更时,使用git reset丢弃该变更。当选择已暂存的变更时,取消暂存该变更 |
@@ -338,7 +331,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
338331
| `` mouse wheel down (fn+up) `` | 向下滚动 | |
339332
| `` mouse wheel up (fn+down) `` | 向上滚动 | |
340333
| `` <tab> `` | 切换到其他面板 | 切换到其他视图(已暂存/未暂存的变更) |
341-
| `` <esc> `` | Exit back to side panel | |
334+
| `` <esc> `` | 退出回到侧边面板 | |
342335
| `` / `` | 开始搜索 | |
343336

344337
## 状态
@@ -382,16 +375,23 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
382375
| `` w `` | 查看工作区选项 | |
383376
| `` / `` | 通过文本过滤当前视图 | |
384377

378+
## 输入提示
379+
380+
| Key | Action | Info |
381+
|-----|--------|-------------|
382+
| `` <enter> `` | 确认 | |
383+
| `` <esc> `` | 关闭 | |
384+
385385
## 远程
386386

387387
| Key | Action | Info |
388388
|-----|--------|-------------|
389389
| `` <enter> `` | 查看分支 | |
390390
| `` n `` | 添加新的远程仓库 | |
391391
| `` d `` | 删除 | 删除选中的远程。从远程跟踪远程分支的任何本地分支都不会受到影响。 |
392-
| `` e `` | 编辑 | 编辑远程仓库 |
392+
| `` e `` | 编辑(Edit) | 编辑远程仓库 |
393393
| `` f `` | 抓取 | 抓取远程仓库 |
394-
| `` F `` | Add fork remote | Quickly add a fork remote by replacing the owner in the origin URL and optionally check out a branch from new remote. |
394+
| `` F `` | 添加复刻远程仓库 | 通过替换 origin URL 中的所有者来快速添加复刻远程仓库,并可选择从新远程仓库检出分支。 |
395395
| `` / `` | 通过文本过滤当前视图 | |
396396

397397
## 远程分支

0 commit comments

Comments
 (0)