Back to Lazygit

Lazygit 鍵盤快捷鍵

docs-master/keybindings/Keybindings_zh-TW.md

0.61.124.6 KB
Original Source

This file is auto-generated. To update, make the changes in the pkg/i18n directory and then run go generate ./... from the project root.

Lazygit 鍵盤快捷鍵

說明:<c-b> 表示 Ctrl+B、<a-b> 表示 Alt+B,B表示 Shift+B

全域快捷鍵

KeyActionInfo
<c-r>切換到最近使用的版本庫
<pgup> (fn+up/shift+k)向上捲動主面板
<pgdown> (fn+down/shift+j)向下捲動主面板
@開啟命令記錄選單View options for the command log e.g. show/hide the command log and focus the command log.
P推送推送到遠端。如果沒有設定遠端,會開啟設定視窗。
p拉取從遠端同步當前分支。如果沒有設定遠端,會開啟設定視窗。
)Increase rename similarity thresholdIncrease the similarity threshold for a deletion and addition pair to be treated as a rename.

The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. | | ( | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.

The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. | | } | 增加差異檢視中顯示變更周圍上下文的大小 | Increase the amount of the context shown around changes in the diff view.

The default can be changed in the config file with the key 'git.diffContextSize'. | | { | 減小差異檢視中顯示變更周圍上下文的大小 | Decrease the amount of the context shown around changes in the diff view.

The default can be changed in the config file with the key 'git.diffContextSize'. | | : | Execute shell command | Bring up a prompt where you can enter a shell command to execute. | | <c-p> | 檢視自訂補丁選項 | | | m | 查看合併/變基選項 | View options to abort/continue/skip the current merge/rebase. | | R | 重新整理 | Refresh the git state (i.e. run git status, git branch, etc in background to update the contents of panels). This does not run git fetch. | | + | 下一個螢幕模式(常規/半螢幕/全螢幕) | | | _ | 上一個螢幕模式 | | | \| | Cycle pagers | Choose the next pager in the list of configured pagers | | <esc> | 取消 | | | ? | 開啟選單 | | | <c-s> | 檢視篩選路徑選項 | View options for filtering the commit log, so that only commits matching the filter are shown. | | W | 開啟差異比較選單 | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. | | <c-e> | 開啟差異比較選單 | View options relating to diffing two refs e.g. diffing against selected ref, entering ref to diff against, and reversing the diff direction. | | q | 結束 | | | <c-z> | Suspend the application | | | <c-w> | 切換是否在差異檢視中顯示空格變更 | Toggle whether or not whitespace changes are shown in the diff view.

The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. | | z | 復原 | 將使用 reflog 確任 git 指令以復原。這不包括工作區更改;只考慮提交。 | | Z | 取消復原 | 將使用 reflog 確任 git 指令以重作。這不包括工作區更改;只考慮提交。 |

移動

KeyActionInfo
,上一頁
.下一頁
< (<home>)捲動到頂部
> (<end>)捲動到底部
v切換拖曳選擇
<s-down>Range select down
<s-up>Range select up
/搜尋
H向左捲動
L向右捲動
]下一個索引標籤
[上一個索引標籤

Input prompt

KeyActionInfo
<enter>確認
<esc>關閉/取消

主面板 (補丁生成)

KeyActionInfo
<left>選擇上一段
<right>選擇下一段
v切換拖曳選擇
aToggle hunk selectionToggle line-by-line vs. hunk selection mode.
<c-o>複製所選文本至剪貼簿
o開啟檔案使用預設軟體開啟
e編輯檔案使用外部編輯器開啟
<space>向 (或從) 補丁中添加/刪除行
dRemove lines from commitRemove the selected lines from this commit. This runs an interactive rebase in the background, so you may get a merge conflict if a later commit also changes these lines.
<esc>退出自訂補丁建立器
/搜尋

主面板(一般)

KeyActionInfo
mouse wheel down (fn+up)向下捲動
mouse wheel up (fn+down)向上捲動
<tab>切換至另一個面板 (已預存/未預存更改)Switch to other view (staged/unstaged changes).
<esc>Exit back to side panel
/搜尋

主面板(合併)

KeyActionInfo
<space>挑選程式碼片段
b挑選所有程式碼片段
<up>選擇上一段
<down>選擇下一段
<left>選擇上一個衝突
<right>選擇下一個衝突
z復原Undo last merge conflict resolution.
e編輯檔案使用外部編輯器開啟
o開啟檔案使用預設軟體開啟
MView merge conflict optionsView options for resolving merge conflicts.
<esc>返回檔案面板

主面板(預存)

KeyActionInfo
<left>選擇上一段
<right>選擇下一段
v切換拖曳選擇
aToggle hunk selectionToggle line-by-line vs. hunk selection mode.
<c-o>複製所選文本至剪貼簿
<space>切換預存切換現有行的狀態 (已預存/未預存)
d刪除變更 (git reset)When unstaged change is selected, discard the change using git reset. When staged change is selected, unstage the change.
o開啟檔案使用預設軟體開啟
e編輯檔案使用外部編輯器開啟
<esc>返回檔案面板
<tab>切換至另一個面板 (已預存/未預存更改)Switch to other view (staged/unstaged changes).
E編輯程式碼塊Edit selected hunk in external editor.
c提交變更提交暫存區變更
w沒有預提交 hook 就提交更改
C使用 git 編輯器提交變更
<c-f>Find base commit for fixupFind the commit that your current changes are building upon, for the sake of amending/fixing up the commit. This spares you from having to look through your branch's commits one-by-one to see which commit should be amended/fixed up. See docs: https://github.com/jesseduffield/lazygit/tree/master/docs/Fixup_Commits.md
/搜尋

功能表

KeyActionInfo
<enter>執行
<esc>關閉/取消
/搜尋

子提交

KeyActionInfo
<c-o>Copy abbreviated commit hash to clipboard
<space>檢出Checkout the selected commit as a detached HEAD.
y複製提交屬性Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author).
o在瀏覽器中開啟提交
n從提交建立新分支
NMove commits to new branchCreate 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.

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). | | g | 檢視重設選項 | View reset options (soft/mixed/hard) for resetting onto selected item. | | C | 複製提交 (揀選) | Mark commit as copied. Then, within the local commits view, you can press V to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press <esc> to cancel the selection. | | <c-r> | 重設選定的揀選 (複製) 提交 | | | <c-t> | 開啟外部差異工具 (git difftool) | | | * | Select commits of current branch | | | 0 | Focus main view | | | <enter> | 檢視所選項目的檔案 | | | w | 檢視工作目錄選項 | | | / | 搜尋 | |

子模組

KeyActionInfo
<c-o>複製子模組名稱到剪貼簿
<enter>Enter進入子模組
dRemoveRemove the selected submodule and its corresponding directory.
uUpdate更新子模組
n新增子模組
e更新子模組 URL
iInitialize初始化子模組
b查看批量子模組選項
/搜尋

工作目錄

KeyActionInfo
nNew worktree
<space>SwitchSwitch to the selected worktree.
o在編輯器中開啟
dRemoveRemove the selected worktree. This will both delete the worktree's directory, as well as metadata about the worktree in the .git directory.
/搜尋

提交

KeyActionInfo
<c-o>Copy abbreviated commit hash to clipboard
<c-r>重設選定的揀選 (複製) 提交
b查看二分選項
s壓縮 (Squash)Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it.
f修復 (Fixup)Meld the selected commit into the commit below it. Similar to squash, but the selected commit's message will be discarded.
cSet fixup messageSet the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message.
r改寫提交改寫選中的提交訊息
R使用編輯器改寫提交
d刪除提交Drop the selected commit. This will remove the commit from the branch via a rebase. If the commit makes changes that later commits depend on, you may need to resolve merge conflicts.
e編輯(開始互動變基)編輯提交
i開始互動變基Start an interactive rebase for the commits on your branch. This will include all commits from the HEAD commit down to the first merge commit or main branch commit.
If you would instead like to start an interactive rebase from the selected commit, press e.
p挑選挑選提交 (於變基過程中)
F建立修復提交為此提交建立修復提交
S壓縮上方所有「fixup」提交(自動壓縮)是否壓縮上方 {{.commit}} 所有「fixup」提交?
<c-j>向下移動提交
<c-k>向上移動提交
V貼上提交 (揀選)
B為了變基已標注提交為基準提交請為了下一次變基選擇一項基準提交;此將執行 git rebase --onto
A修改使用已預存的更改修正提交
a設定/重設提交作者Set/Reset commit author or set co-author.
t還原Create a revert commit for the selected commit, which applies the selected commit's changes in reverse.
T打標籤到提交Create a new tag pointing at the selected commit. You'll be prompted to enter a tag name and optional description.
<c-l>開啟記錄選單View options for commit log e.g. changing sort order, hiding the git graph, showing the whole git graph.
GOpen pull request in browser
<space>檢出Checkout the selected commit as a detached HEAD.
y複製提交屬性Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author).
o在瀏覽器中開啟提交
n從提交建立新分支
NMove commits to new branchCreate 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.

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). | | g | 檢視重設選項 | View reset options (soft/mixed/hard) for resetting onto selected item. | | C | 複製提交 (揀選) | Mark commit as copied. Then, within the local commits view, you can press V to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press <esc> to cancel the selection. | | <c-t> | 開啟外部差異工具 (git difftool) | | | * | Select commits of current branch | | | 0 | Focus main view | | | <enter> | 檢視所選項目的檔案 | | | w | 檢視工作目錄選項 | | | / | 搜尋 | |

提交摘要

KeyActionInfo
<enter>確認
<esc>關閉

提交檔案

KeyActionInfo
<c-o>複製檔案名稱到剪貼簿
y複製到剪貼簿
c檢出檢出檔案
d捨棄Discard this commit's changes to this file. This runs an interactive rebase in the background, so you may get a merge conflict if a later commit also changes this file.
o開啟檔案使用預設軟體開啟
e編輯使用外部編輯器開啟
<c-t>開啟外部差異工具 (git difftool)
<space>切換檔案是否包含在補丁中Toggle whether the file is included in the custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches.
a切換所有檔案是否包含在補丁中Add/remove all commit's files to custom patch. See https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches.
<enter>輸入檔案以將選定的行添加至補丁(或切換目錄折疊)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.
`顯示檔案樹狀視圖Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.

The default can be changed in the config file with the key 'gui.showFileTree'. | | - | Collapse all files | Collapse all directories in the files tree | | = | Expand all files | Expand all directories in the file tree | | 0 | Focus main view | | | / | 搜尋 | |

收藏 (Stash)

KeyActionInfo
<space>套用Apply the stash entry to your working directory.
g還原Apply the stash entry to your working directory and remove the stash entry.
d捨棄Remove the stash entry from the stash list.
n新分支Create a new branch from the selected stash entry. This works by git checking out the commit that the stash entry was created from, creating a new branch from that commit, then applying the stash entry to the new branch as an additional commit.
r重新命名收藏
0Focus main view
<enter>檢視所選項目的檔案
w檢視工作目錄選項
/搜尋

日誌

KeyActionInfo
<c-o>Copy abbreviated commit hash to clipboard
<space>檢出Checkout the selected commit as a detached HEAD.
y複製提交屬性Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author).
o在瀏覽器中開啟提交
n從提交建立新分支
NMove commits to new branchCreate 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.

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). | | g | 檢視重設選項 | View reset options (soft/mixed/hard) for resetting onto selected item. | | C | 複製提交 (揀選) | Mark commit as copied. Then, within the local commits view, you can press V to paste (cherry-pick) the copied commit(s) into your checked out branch. At any time you can press <esc> to cancel the selection. | | <c-r> | 重設選定的揀選 (複製) 提交 | | | <c-t> | 開啟外部差異工具 (git difftool) | | | * | Select commits of current branch | | | 0 | Focus main view | | | <enter> | 檢視提交 | | | w | 檢視工作目錄選項 | | | / | 搜尋 | |

本地分支

KeyActionInfo
<c-o>複製分支名稱到剪貼簿
i顯示 git-flow 選項
<space>檢出檢出選定的項目。
n新分支
NMove commits to new branchCreate 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.

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). | | o | 建立拉取請求 | | | O | 建立拉取請求選項 | | | G | Open pull request in browser | | | <c-y> | 複製拉取請求的 URL 到剪貼板 | | | c | 根據名稱檢出 | Checkout by name. In the input box you can enter '-' to switch to the previous branch. | | - | Checkout previous branch | | | F | 強制檢出 | Force checkout selected branch. This will discard all local changes in your working directory before checking out the selected branch. | | d | 刪除 | View delete options for local/remote branch. | | r | 將已檢出的分支變基至此分支 | Rebase the checked-out branch onto the selected branch. | | M | 合併到當前檢出的分支 | View options for merging the selected item into the current branch (regular merge, squash merge) | | f | 從上游快進此分支 | 從遠端快進所選的分支 | | T | 建立標籤 | | | s | 排序規則 | | | g | 檢視重設選項 | | | R | 重新命名分支 | | | u | 檢視遠端設定 | 檢視有關遠端分支的設定(例如重設至遠端) | | <c-t> | 開啟外部差異工具 (git difftool) | | | 0 | Focus main view | | | <enter> | 檢視提交 | | | w | 檢視工作目錄選項 | | | / | 搜尋 | |

標籤

KeyActionInfo
<c-o>Copy tag to clipboard
<space>檢出Checkout the selected tag as a detached HEAD.
n建立標籤Create new tag from current commit. You'll be prompted to enter a tag name and optional description.
d刪除View delete options for local/remote tag.
P推送標籤Push the selected tag to a remote. You'll be prompted to select a remote.
g重設View reset options (soft/mixed/hard) for resetting onto selected item.
<c-t>開啟外部差異工具 (git difftool)
0Focus main view
<enter>檢視提交
w檢視工作目錄選項
/搜尋

檔案

KeyActionInfo
<c-o>複製檔案名稱到剪貼簿
<space>切換預存Toggle staged for selected file.
<c-b>篩選檔案 (預存/未預存)
y複製到剪貼簿
c提交變更提交暫存區變更
w沒有預提交 hook 就提交更改
A修改上次提交
C使用 git 編輯器提交變更
<c-f>Find base commit for fixupFind the commit that your current changes are building upon, for the sake of amending/fixing up the commit. This spares you from having to look through your branch's commits one-by-one to see which commit should be amended/fixed up. See docs: https://github.com/jesseduffield/lazygit/tree/master/docs/Fixup_Commits.md
e編輯使用外部編輯器開啟
o開啟檔案使用預設軟體開啟
i忽略或排除檔案
r重新整理檔案
s收藏Stash all changes. For other variations of stashing, use the view stash options keybinding.
S檢視收藏選項View stash options (e.g. stash all, stash staged, stash unstaged).
a全部預存/取消預存Toggle staged/unstaged for all files in working tree.
<enter>選擇檔案中的單個程式碼塊/行,或展開/折疊目錄If the selected item is a file, focus the staging view so you can stage individual hunks/lines. If the selected item is a directory, collapse/expand it.
d捨棄檢視選中變動進行捨棄復原
g檢視遠端重設選項
D重設View reset options for working tree (e.g. nuking the working tree).
`顯示檔案樹狀視圖Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.

The default can be changed in the config file with the key 'gui.showFileTree'. | | <c-t> | 開啟外部差異工具 (git difftool) | | | M | View merge conflict options | View options for resolving merge conflicts. | | f | 擷取 | 同步遠端異動 | | - | Collapse all files | Collapse all directories in the files tree | | = | Expand all files | Expand all directories in the file tree | | 0 | Focus main view | | | / | 搜尋 | |

次要

KeyActionInfo
<tab>切換至另一個面板 (已預存/未預存更改)Switch to other view (staged/unstaged changes).
<esc>Exit back to side panel
/搜尋

狀態

KeyActionInfo
o開啟設定檔案使用預設軟體開啟
e編輯設定檔案使用外部編輯器開啟
u檢查更新
<enter>切換到最近使用的版本庫
aShow/cycle all branch logs
AShow/cycle all branch logs (reverse)
0Focus main view

確認面板

KeyActionInfo
<enter>確認
<esc>關閉/取消
<c-o>複製到剪貼簿

遠端

KeyActionInfo
<enter>View branches
n新增遠端
dRemoveRemove the selected remote. Any local branches tracking a remote branch from the remote will be unaffected.
e編輯編輯遠端
f擷取擷取遠端
FAdd fork remoteQuickly add a fork remote by replacing the owner in the origin URL and optionally check out a branch from new remote.
/搜尋

遠端分支

KeyActionInfo
<c-o>複製分支名稱到剪貼簿
<space>檢出Checkout a new local branch based on the selected remote branch, or the remote branch as a detached head.
n新分支
M合併到當前檢出的分支View options for merging the selected item into the current branch (regular merge, squash merge)
r將已檢出的分支變基至此分支Rebase the checked-out branch onto the selected branch.
d刪除Delete the remote branch from the remote.
u設置為遠端將此分支設為當前分支之遠端
s排序規則
g檢視重設選項View reset options (soft/mixed/hard) for resetting onto selected item.
<c-t>開啟外部差異工具 (git difftool)
0Focus main view
<enter>檢視提交
w檢視工作目錄選項
/搜尋