garden: run "doc" before "pages"
[git-cola.git] / docs / hotkeys.html
blobbf033c6519d33f8995a081de67857f925a5accb4
1 <!doctype html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <style type="text/css">
6 body {
7 font-family: Helvetica, Ubuntu, sans;
8 background-color: #303030;
9 color: #fff;
12 table.center {
13 width: 50%;
14 float: left;
15 padding-bottom: 20px;
18 td {
19 vertical-align: top;
22 td.title {
23 color: #ff6;
24 font-weight: bold;
27 td.shortcut {
28 font-family: Monaco, "Ubuntu Mono", monospace;
29 color: #ff6;
30 text-align: right;
31 font-size: 0.8em;
34 span.title {
35 font-size: 1.3em;
36 font-weight: bold;
38 </style>
39 </head>
41 <body>
42 <span class="title">Keyboard shortcuts</span>
43 <hr />
45 <!-- Preparing Commits -->
46 <table class="center">
47 <tr>
48 <td width="35%">&nbsp;</td>
49 <td>&nbsp;</td>
50 <td class="title">Commit</td>
51 </tr>
52 <tr>
53 <td class="shortcut">Ctrl + Return</td>
54 <td>:</td>
55 <td>Commit staged changes</td>
56 </tr>
57 <tr>
58 <td class="shortcut">Ctrl + Shift + Return</td>
59 <td>:</td>
60 <td>Prepare commit message hook</td>
61 </tr>
62 <tr>
63 <td class="shortcut">Ctrl + S</td>
64 <td>:</td>
65 <td>Stage / unstage selected files</td>
66 </tr>
67 <tr>
68 <td class="shortcut">Ctrl + Shift + S</td>
69 <td>:</td>
70 <td>Stage / unstage all files</td>
71 </tr>
72 <tr>
73 <td class="shortcut">Alt + A</td>
74 <td>:</td>
75 <td>Stage modified files</td>
76 </tr>
77 <tr>
78 <td class="shortcut">Alt + U</td>
79 <td>:</td>
80 <td>Stage untracked files</td>
81 </tr>
82 <tr>
83 <td class="shortcut">Ctrl + U / Alt + Shift + R</td>
84 <td>:</td>
85 <td>Revert the selected lines, or the diff hunk beneath the text cursor when nothing
86 is selected, from the worktree</td>
87 </tr>
88 <tr>
89 <td class="shortcut">Ctrl + Shift + U</td>
90 <td>:</td>
91 <td>Launch an external editor to edit the selected lines, or the diff hunk beneath
92 the text cursor when nothing is selected, and then revert unstaged changes
93 using the edited diff</td>
94 </tr>
95 <tr>
96 <td class="shortcut">Ctrl + Z</td>
97 <td>:</td>
98 <td>Revert uncommitted changes</td>
99 </tr>
100 <tr>
101 <td class="shortcut">Ctrl + Shift + M</td>
102 <td>:</td>
103 <td>Merge branches</td>
104 </tr>
105 <tr>
106 <td class="shortcut">Ctrl + m</td>
107 <td>:</td>
108 <td>Amend last commit</td>
109 </tr>
110 <tr>
111 <td class="shortcut">Ctrl + Shift + C</td>
112 <td>:</td>
113 <td>Cherry pick</td>
114 </tr>
115 </table>
117 <!-- Actions -->
118 <table class="center">
119 <tr>
120 <td width="35%">&nbsp;</td>
121 <td>&nbsp;</td>
122 <td class="title">Actions</td>
123 </tr>
124 <tr>
125 <td class="shortcut">Ctrl + B</td>
126 <td>:</td>
127 <td>Create branch</td>
128 </tr>
129 <tr>
130 <td class="shortcut">Alt + B</td>
131 <td>:</td>
132 <td>Checkout branch</td>
133 </tr>
134 <tr>
135 <td class="shortcut">Ctrl + T</td>
136 <td>:</td>
137 <td>Find files</td>
138 </tr>
139 <tr>
140 <td class="shortcut">Alt + G</td>
141 <td>:</td>
142 <td>Grep</td>
143 </tr>
144 <tr>
145 <td class="shortcut">Alt + D</td>
146 <td>:</td>
147 <td>Show diffstat</td>
148 </tr>
149 <tr>
150 <td class="shortcut">Alt + E</td>
151 <td>:</td>
152 <td>Export patches</td>
153 </tr>
154 <tr>
155 <td class="shortcut">Alt + Shift + S</td>
156 <td>:</td>
157 <td>Stash</td>
158 </tr>
159 <tr>
160 <td class="shortcut">Ctrl + Enter</td>
161 <td>:</td>
162 <td>Apply Stash</td>
163 </tr>
164 <tr>
165 <td class="shortcut">Ctrl + Backspace</td>
166 <td>:</td>
167 <td>Pop Stash</td>
168 </tr>
169 <tr>
170 <td class="shortcut">Ctrl + Shift + Backspace</td>
171 <td>:</td>
172 <td>Drop Stash</td>
173 </tr>
174 <tr>
175 <td class="shortcut">Ctrl + Backspace</td>
176 <td>:</td>
177 <td>Delete untracked files</td>
178 </tr>
179 <tr>
180 <td class="shortcut">Alt + Shift + F</td>
181 <td>:</td>
182 <td>Toggle paths filter</td>
183 </tr>
184 <tr>
185 <td class="shortcut">Alt + R</td>
186 <td>:</td>
187 <td>Start/continue interactive rebase</td>
188 </tr>
189 <tr>
190 <td class="shortcut">Ctrl + R</td>
191 <td>:</td>
192 <td>Refresh</td>
193 </tr>
194 <tr>
195 <td class="shortcut">?</td>
196 <td>:</td>
197 <td>Keyboard shortcuts</td>
198 </tr>
199 </table>
201 <!-- Editing -->
202 <table class="center">
203 <tr>
204 <td width="35%">&nbsp;</td>
205 <td>&nbsp;</td>
206 <td class="title">Editing</td>
207 </tr>
208 <tr>
209 <td class="shortcut">Enter / Ctrl + E</td>
210 <td>:</td>
211 <td>Launch editor</td>
212 </tr>
213 <tr>
214 <td class="shortcut">Space</td>
215 <td>:</td>
216 <td>Open using default application</td>
217 </tr>
218 <tr>
219 <td class="shortcut">Shift + Space</td>
220 <td>:</td>
221 <td>Open parent directory</td>
222 </tr>
223 <tr>
224 <td class="shortcut">Ctrl + Alt + C</td>
225 <td>:</td>
226 <td>Copy Commit ID</td>
227 </tr>
228 <tr>
229 <td class="shortcut">Ctrl + Shift + E</td>
230 <td>:</td>
231 <td>View / edit recently modified files</td>
232 </tr>
233 <tr>
234 <td class="shortcut">Ctrl + #</td>
235 <td>:</td>
236 <td>Focus tools</td>
237 </tr>
238 <tr>
239 <td class="shortcut">Ctrl + Shift + #</td>
240 <td>:</td>
241 <td>Show and hide tools<br>
242 # is 1 for commit, 2 for status, 3 for diff, etc.</td>
243 </tr>
244 <tr>
245 <td class="shortcut">Ctrl + Space</td>
246 <td>:</td>
247 <td>Display autocomplete options</td>
248 </tr>
249 <tr>
250 <td class="shortcut">Ctrl + Shift + #</td>
251 <td>:</td>
252 <td>Show and hide tools<br>
253 # is 1 for commit, 2 for status, 3 for diff, etc.</td>
254 </tr>
255 </table>
257 <!-- Remotes -->
258 <table class="center">
259 <tr>
260 <td width="35%">&nbsp;</td>
261 <td>&nbsp;</td>
262 <td class="title">Remotes</td>
263 </tr>
264 <tr>
265 <td class="shortcut">Ctrl + P</td>
266 <td>:</td>
267 <td>Launch the Push dialog</td>
268 </tr>
269 <tr>
270 <td class="shortcut">Ctrl + Shift + P</td>
271 <td>:</td>
272 <td>Launch the Pull dialog</td>
273 </tr>
274 </table>
276 <!-- Diff -->
277 <table class="center">
278 <tr>
279 <td width="35%">&nbsp;</td>
280 <td>&nbsp;</td>
281 <td class="title">Diff</td>
282 </tr>
283 <tr>
284 <td class="shortcut">S</td>
285 <td>:</td>
286 <td>Stage or unstage the selected lines, or the diff hunk beneath the text cursor
287 when nothing is selected</td>
288 </tr>
289 <tr>
290 <td class="shortcut">Ctrl + Shift + S</td>
291 <td>:</td>
292 <td>Launch an external editor to edit the selected lines, or the diff hunk beneath the
293 text cursor when nothing is selected, and then stage or unstage the edited diff</td>
294 </tr>
295 <tr>
296 <td class="shortcut">Ctrl + D</td>
297 <td>:</td>
298 <td>View diff using `git difftool`</td>
299 </tr>
300 <tr>
301 <td class="shortcut">Ctrl + F</td>
302 <td>:</td>
303 <td>Search diff for matching text</td>
304 </tr>
305 <tr>
306 <td class="shortcut">Ctrl + G</td>
307 <td>:</td>
308 <td>Search diff for the next text match</td>
309 </tr>
310 <tr>
311 <td class="shortcut">Ctrl + Shift + G</td>
312 <td>:</td>
313 <td>Search diff for the previous text match</td>
314 </tr>
315 <tr>
316 <td class="shortcut">Alt + Shift + C</td>
317 <td>:</td>
318 <td>Copy Diff to clipboard (strips diff +/- prefixes)</td>
319 </tr>
320 <tr>
321 <td class="shortcut">Ctrl + Shift + D</td>
322 <td>:</td>
323 <td>View directory diff using `git difftool --dir-diff`</td>
324 </tr>
325 <tr>
326 <td class="shortcut">Shift</td>
327 <td>:</td>
328 <td>Hold Shift to select text when moving the cursor with H, J, K, L
329 and Arrow keys</td>
330 </tr>
331 <tr>
332 <td class="shortcut">Space / Shift + Space</td>
333 <td>:</td>
334 <td>Page Down / Page Up</td>
335 </tr>
336 <tr>
337 <td class="shortcut">0 (Zero)</td>
338 <td>:</td>
339 <td>Move cursor to the start of the line</td>
340 </tr>
341 <tr>
342 <td class="shortcut">$ (Shift + 4)</td>
343 <td>:</td>
344 <td>Move cursor to the end of the line</td>
345 </tr>
346 <tr>
347 <td class="shortcut">G G</td>
348 <td>:</td>
349 <td>Move cursor to the start of the diff</td>
350 </tr>
351 <tr>
352 <td class="shortcut">Shift + G</td>
353 <td>:</td>
354 <td>Move cursor to the end of the diff</td>
355 </tr>
356 </table>
358 <!-- Browser actions -->
359 <table class="center">
360 <tr>
361 <td width="35%">&nbsp;</td>
362 <td>&nbsp;</td>
363 <td class="title">Browser actions</td>
364 </tr>
365 <tr>
366 <td class="shortcut">Ctrl + Shift + H</td>
367 <td>:</td>
368 <td>View history</td>
369 </tr>
370 <tr>
371 <td class="shortcut">Ctrl + Shift + D</td>
372 <td>:</td>
373 <td>View diff against predecessor</td>
374 </tr>
375 </table>
377 <!-- Tree navigation -->
378 <table class="center">
379 <tr>
380 <td width="35%">&nbsp;</td>
381 <td>&nbsp;</td>
382 <td class="title">Navigation</td>
383 </tr>
384 <tr>
385 <td class="shortcut">H</td>
386 <td>:</td>
387 <td>Move left/collapse</td>
388 </tr>
389 <tr>
390 <td class="shortcut">J / Alt + J</td>
391 <td>:</td>
392 <td>Move down</td>
393 </tr>
394 <tr>
395 <td class="shortcut">K / Alt + K</td>
396 <td>:</td>
397 <td>Move up</td>
398 </tr>
399 <tr>
400 <td class="shortcut">L</td>
401 <td>:</td>
402 <td>Move right/expand</td>
403 </tr>
404 <tr>
405 <td class="shortcut">Ctrl + J</td>
406 <td>:</td>
407 <td>Focus the Diff Editor</td>
408 </tr>
409 <tr>
410 <td class="shortcut">Ctrl + K</td>
411 <td>:</td>
412 <td>Focus the Status tool</td>
413 </tr>
414 <tr>
415 <td class="shortcut">Ctrl + L</td>
416 <td>:</td>
417 <td>Focus the Commit summary, Grep query, DAG query, ...</td>
418 </tr>
419 </table>
421 </body>