summaryrefslogtreecommitdiffstats
path: root/docs/keybindings/Keybindings_en.md
blob: 3417b9f19f2e47d7b13f65c748e2add1ed0b023f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
_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 Keybindings

_Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_

## Global keybindings

| Key | Action | Info |
|-----|--------|-------------|
| `` <c-r> `` | Switch to a recent repo |  |
| `` <pgup> (fn+up/shift+k) `` | Scroll up main panel |  |
| `` <pgdown> (fn+down/shift+j) `` | Scroll down main panel |  |
| `` @ `` | Open command log menu |  |
| `` } `` | Increase the size of the context shown around changes in the diff view |  |
| `` { `` | Decrease the size of the context shown around changes in the diff view |  |
| `` : `` | Execute custom command |  |
| `` <c-p> `` | View custom patch options |  |
| `` m `` | View merge/rebase options |  |
| `` R `` | Refresh |  |
| `` + `` | Next screen mode (normal/half/fullscreen) |  |
| `` _ `` | Prev screen mode |  |
| `` ? `` | Open menu |  |
| `` <c-s> `` | View filter-by-path options |  |
| `` W `` | Open diff menu |  |
| `` <c-e> `` | Open diff menu |  |
| `` <c-w> `` | Toggle whether or not whitespace changes are shown in the diff view |  |
| `` 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. |
| `` <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. |
| `` P `` | Push |  |
| `` p `` | Pull |  |

## List panel navigation

| Key | Action | Info |
|-----|--------|-------------|
| `` , `` | Previous page |  |
| `` . `` | Next page |  |
| `` < `` | Scroll to top |  |
| `` > `` | Scroll to bottom |  |
| `` v `` | Toggle range select |  |
| `` <s-down> `` | Range select down |  |
| `` <s-up> `` | Range select up |  |
| `` / `` | Search the current view by text |  |
| `` H `` | Scroll left |  |
| `` L `` | Scroll right |  |
| `` ] `` | Next tab |  |
| `` [ `` | Previous tab |  |

## Commit files

| Key | Action | Info |
|-----|--------|-------------|
| `` <c-o> `` | Copy the committed file name to the clipboard |  |
| `` c `` | Checkout file |  |
| `` d `` | Discard this commit's changes to this file |  |
| `` o `` | Open file |  |
| `` e `` | Edit file |  |
| `` <c-t> `` | Open external diff tool (git difftool) |  |
| `` <space> `` | Toggle file included in patch |  |
| `` a `` | Toggle all files included in patch |  |
| `` <enter> `` | Enter file to add selected lines to the patch (or toggle directory collapsed) |  |
| `` ` `` | Toggle file tree view |  |
| `` / `` | Search the current view by text |  |

## Commit summary

| Key | Action | Info |
|-----|--------|-------------|
| `` <enter> `` | Confirm |  |
| `` <esc> `` | Close |  |

## Commits

| Key | Action | Info |
|-----|--------|-------------|
| `` <c-o> `` | Copy commit SHA to clipboard |  |
| `` <c-r> `` | Reset cherry-picked (copied) commits selection |  |
| `` b `` | View bisect options |  |
| `` s `` | Squash down |  |
| `` f `` | Fixup commit |  |
| `` r `` | Reword commit |  |
| `` R `` | Reword commit with editor |  |
| `` d `` | Delete commit |  |
| `` e `` | Edit commit |  |
| `` i `` | Start interactive rebase | 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 `` | Pick commit (when mid-rebase) |  |
| `` F `` | Create fixup commit for this commit |  |
| `` S `` | Squash all 'fixup!' commits above selected commit (autosquash) |  |
| `` <c-j> `` | Move commit down one |  |
| `` <c-k> `` | Move commit up one |  |
| `` V `` | Paste commits (cherry-pick) |  |
| `` B `` | Mark commit as base commit for rebase | Select a base commit for the next rebase; this will effectively perform a 'git rebase --onto'. |
| `` A `` | Amend commit with staged changes |  |
| `` a `` | Set/Reset commit author |  |
| `` t `` | Revert commit |  |
| `` T `` | Tag commit |  |
| `` <c-l> `` | Open log menu |  |
| `` w `` | View worktree options |  |
| `` <space> `` | Checkout commit |  |
| `` y `` | Copy commit attribute |  |
| `` o `` | Open commit in browser |  |
| `` n `` | Create new branch off of commit |  |
| `` g `` | View reset options |  |
| `` C `` | Copy commit (cherry-pick) |  |
| `` <c-t> `` | Open external diff tool (git difftool) |  |
| `` <enter> `` | View selected item's files |  |
| `` / `` | Search the current view by text |  |

## Confirmation panel

| Key | Action | Info |
|-----|--------|-------------|
| `` <enter> `` | Confirm |  |
| `` <esc> `` | Close/Cancel |  |

## Files

| Key | Action | Info |
|-----|--------|-------------|
| `` <c-o> `` | Copy the file name to the clipboard |  |
| `` <space> `` | Toggle staged |  |
| `` <c-b> `` | Filter files by status |  |
| `` y `` | Copy to clipboard |  |
| `` c `` | Commit changes |  |
| `` w `` | Commit changes without pre-commit hook |  |
| `` A `` | Amend last commit |  |
| `` C `` | Commit changes using git editor |  |
| `` <c-f> `` | Find base commit for fixup | Find 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 `` | Edit file |  |
| `` o `` | Open file |  |
| `` i `` | Ignore or exclude file |  |
| `` r `` | Refresh files |  |
| `` s `` | Stash all changes |  |
| `` S `` | View stash options |  |
| `` a `` | Stage/unstage all |  |
| `` <enter> `` | Stage individual hunks/lines for file, or collapse/expand for directory |  |
| `` d `` | View 'discard changes' options |  |
| `` g `` | View upstream reset options |  |
| `` D `` | View reset options |  |
| `` ` `` | Toggle file tree view |  |
| `` <c-t> `` | Open external diff tool (git difftool) |  |
| `` M `` | Open external merge tool (git mergetool) |  |
| `` f `` | Fetch |  |
| `` / `` | Search the current view by text |  |

## Local branches

| Key | Action | Info |
|-----|--------|-------------|
| `` <c-o> `` | Copy branch name to clipboard |  |
| `` i `` | Show git-flow options |  |
| `` <space> `` | Checkout |  |
| `` n `` | New branch |  |
| `` o `` | Create pull request |  |
| `` O `` | Create pull request options |  |
| `` <c-y> `` | Copy pull request URL to clipboard |  |
| `` c `` | Checkout by name, enter '-' to switch to last |  |
| `` F `` | Force checkout |  |
| `` d `` | View delete options |  |
| `` r `` | Rebase checked-out branch onto this branch |  |
| `` M `` | Merge into currently checked out branch |  |
| `` f `` | Fast-forward this branch from its upstream |  |
| `` T `` | Create tag |  |
| `` s `` | Sort order |  |
| `` g `` | View reset options |  |
| `` R `` | Rename branch |  |
| `` u `` | View upstream options | View options relating to the branch's upstream e.g. setting/unsetting the upstream and resetting to the upstream |
| `` w `` | View worktree options |  |
| `` <enter> `` | View commits |  |
| `` / `` | Filter the current view by text |  |

## Main panel (merging)

| Key | Action | Info |
|-----|--------|-------------|
| `` e `` | Edit file |  |
| `` o `` | Open file |  |
| `` <left> `` | Select previous conflict |  |
| `` <right> `` | Select next conflict |  |
| `` <up> `` | Select previous hunk |  |
| `` <down> `` | Select next hunk |  |
| `` z `` | Undo |  |
| `` M `` | Open external merge tool (git mergetool) |  |
| `` <space> `` | Pick hunk |  |
| `` b `` | Pick all hunks |  |
| `` <esc> `` | Return to files panel |  |

## Main panel (normal)

| Key | Action | Info |
|-----|--------|-------------|
| `` mouse wheel down (fn+up) `` | Scroll down |  |
| `` mouse wheel up (fn+down) `` | Scroll up |  |

## Main panel (patch building)

| Key | Action | Info |
|-----|--------|-------------|
| `` <left> `` | Select previous hunk |  |
| `` <right> `` | Select next hunk |  |
| `` v `` | Toggle range select |  |
| `` a `` | Toggle select hunk |  |
| `` <c-o> `` | Copy the selected text to the clipboard |  |
| `` o `` | Open file |  |
| `` e `` | Edit file |  |
| `` <space> `` | Add/Remove line(s) to patch |  |
| `` <esc> `` | Exit custom patch builder |  |
| `` / `` | Search the current view by text |  |

## Main panel (staging)

| Key | Action | Info |
|-----|--------|-------------|
| `` <left> `` | Select previous hunk |  |
| `` <right> `` | Select next hunk |  |
| `` v `` | Toggle range select |  |
| `` a `` | Toggle select hunk |  |
| `` <c-o> `` | Copy the selected text to the clipboard |  |
| `` o `` | Open file |  |
| `` e `` | Edit file |  |
| `` <esc> `` | Return to files panel |  |
| `` <tab> `` | Switch to other panel (staged/unstaged changes) |  |
| `` <space> `` | Toggle line staged / unstaged |  |
| `` d `` | Discard change (git reset) |  |
| `` E `` | Edit hunk |  |
| `` c `` | Commit changes |  |
| `` w `` | Commit changes without pre-commit hook |  |
| `` C `` | Commit changes using git editor |  |
| `` / `` | Search the current view by text |  |

## Menu

| Key | Action | Info |
|-----|--------|-------------|
| `` <enter> `` | Execute |  |
| `` <esc> `` | Close |  |
| `` / `` | Filter the current view by text |  |

## Reflog

| Key | Action | Info |
|-----|--------|-------------|
| `` <c-o> `` | Copy commit SHA to clipboard |  |
| `` w `` | View worktree options |  |
| `` <space> `` | Checkout commit |  |
| `` y `` | Copy commit attribute |  |
| `` o `` | Open commit in browser |  |
| `` n `` | Create new branch off of commit |  |
| `` g `` | View reset options |  |
| `` C `` | Copy commit (cherry-pick) |  |
| `` <c-r> `` | Reset cherry-picked (copied) commits selection |  |
| `` <c-t> `` | Open external diff tool (git difftool) |  |
| `` <enter> `` | View commits |  |
| `` / `` | Filter the current view by text |  |

## Remote branches

| Key | Action | Info |
|-----|--------|-------------|
| `` <c-o> `` | Copy branch name to clipboard |  |
| `` <space> `` | Checkout |  |
| `` n `` | New branch |  |
| `` M `` | Merge into currently checked out branch |  |
| `` r `` | Rebase checked-out branch onto this branch |  |
| `` d `` | Delete remote tag |  |
| `` u `` | Set as upstream of checked-out branch |  |
| `` s `` | Sort order |  |
| `` g `` | View reset options |  |
| `` w `` | View worktree options |  |
| `` <enter> `` | View commits |  |
| `` / `` | Filter the current view by text |  |

## Remotes

| Key | Action | Info |
|-----|--------|-------------|
| `` f `` | Fetch remote |  |
| `` n `` | Add new remote |  |
| `` d `` | Remove remote |  |
| `` e `` | Edit remote |  |
| `` / `` | Filter the current view by text |  |

## Stash

| Key | Action | Info |
|-----|--------|-------------|
| `` <space> `` | Apply |  |
| `` g `` | Pop |  |
| `` d `` | Drop |  |
| `` n `` | New branch |  |
| `` r `` | Rename stash |  |
| `` w `` | View worktree options |  |
| `` <enter> `` | View selected item's files |  |
| `` / `` | Filter the current view by text |  |

## Status

| Key | Action | Info |
|-----|--------|-------------|
| `` o `` | Open config file |  |
| `` e `` | Edit config file |  |
| `` u `` | Check for update |  |
| `` <enter> `` | Switch to a recent repo |  |
| `` a `` | Show all branch logs |  |

## Sub-commits

| Key | Action | Info |
|-----|--------|-------------|
| `` <c-o> `` | Copy commit SHA to clipboard |  |
| `` w `` | View worktree options |  |
| `` <space> `` | Checkout commit |  |
| `` y `` | Copy commit attribute |  |
| `` o `` | Open commit in browser |  |
| `` n `` | Create new branch off of commit |  |
| `` g `` | View reset options |  |
| `` C `` | Copy commit (cherry-pick) |  |
| `` <c-r> `` | Reset cherry-picked (copied) commits selection |  |
| `` <c-t> `` | Open external diff tool (git difftool) |  |
| `` <enter> `` | View selected item's files |  |
| `` / `` | Search the current view by text |  |

## Submodules

| Key | Action | Info |
|-----|--------|-------------|
| `` <c-o> `` | Copy submodule name to clipboard |  |
| `` <enter> `` | Enter submodule |  |
| `` <space> `` | Enter submodule |  |
| `` d `` | Remove submodule |  |
| `` u `` | Update submodule |  |
| `` n `` | Add new submodule |  |
| `` e `` | Update submodule URL |  |
| `` i `` | Initialize submodule |  |
| `` b `` | View bulk submodule options |  |
| `` / `` | Filter the current view by text |  |

## Tags

| Key | Action | Info |
|-----|--------|-------------|
| `` <space> `` | Checkout |  |
| `` d `` | View delete options |  |
| `` P `` | Push tag |  |
| `` n `` | Create tag |  |
| `` g `` | View reset options |  |
| `` w `` | View worktree options |  |
| `` <enter> `` | View commits |  |
| `` / `` | Filter the current view by text |  |

## Worktrees

| Key | Action | Info |
|-----|--------|-------------|
| `` n `` | Create worktree |  |
| `` <space> `` | Switch to worktree |  |
| `` <enter> `` | Switch to worktree |  |
| `` o `` | Open in editor |  |
| `` d `` | Remove worktree |  |
| `` / `` | Filter the current view by text |  |