Keyboard shortcuts
While a Git Checkout window, its sidebar or one of its tabs has focus, these shortcuts work. On macOS use the second column.
| Windows and Linux | macOS | Action |
|---|---|---|
| Ctrl+1 | Cmd+1 | Show Changes; pressed again, focus the commit message |
| Ctrl+2 | Cmd+2 | Show all commits; pressed again, jump to HEAD |
| Ctrl+0 | Cmd+0 | Reveal HEAD in the graph |
| Ctrl+Alt+Shift+K | Ctrl+Alt+Shift+K | Quick Launch |
| Ctrl+F | Cmd+F | Search commits |
| F3, Shift+F3 | F3, Shift+F3 | Next, previous search result (Enter and Shift+Enter in the search field) |
| Ctrl+C | Cmd+C | Copy the selected commit’s hash (in the Changes lists, the file path) |
| Delete | Backspace | Remove the selected commit’s branch or stash (also in the sidebar) |
| Ctrl+Shift+A | Cmd+Shift+A | Filter the graph by the active branch |
| Ctrl+Enter | Cmd+Enter | Commit |
| Ctrl+Shift+Enter | Cmd+Shift+Enter | Commit and push |
| Ctrl+Shift+S | Cmd+S | Stage or unstage the selected files |
| Ctrl+Alt+Shift+S | Cmd+Alt+Shift+S | Stage all |
| Backspace, Ctrl+Shift+D | Backspace, Cmd+Shift+D | Discard the selected files |
| Ctrl+O | Cmd+Alt+Shift+O | Open the selected file |
| Ctrl+D | Cmd+D | Open the selected file in the external diff tool |
| Ctrl+Alt+G, R | Cmd+Alt+G, R | Refresh |
| Ctrl+Alt+G, N | Cmd+Alt+G, N | Clone a repository |
| Ctrl+Alt+G, Shift+N | Cmd+Alt+G, Shift+N | Initialize a repository |
| Ctrl+Alt+G, O | Cmd+Alt+G, O | Open a repository |
| Ctrl+Alt+G, B | Cmd+Alt+G, B | Checkout a branch |
| Ctrl+Alt+G, F | Cmd+Alt+G, F | Fetch |
| Ctrl+Alt+Shift+F | Cmd+Alt+Shift+F | Quick Fetch: the tracked remote, no form |
| Ctrl+Alt+G, L | Cmd+Alt+G, L | Pull |
| Ctrl+Alt+Shift+L | Cmd+Alt+Shift+L | Quick Pull |
| Ctrl+Alt+G, P | Cmd+Alt+G, P | Push |
| Ctrl+Alt+Shift+P | Cmd+Alt+Shift+P | Quick Push |
| Ctrl+Alt+G, Shift+B | Cmd+Alt+G, Shift+B | New branch |
| Ctrl+Alt+G, T | Cmd+Alt+G, T | New tag |
| Ctrl+Alt+G, H | Cmd+Alt+G, H | Save stash |
| Ctrl+Alt+Shift+H | Cmd+Alt+Shift+H | Quick Stash: stash everything, no form |
| Ctrl+Alt+O | Cmd+Ctrl+O | Reveal the repository in the file manager |
| Ctrl+Alt+T | Cmd+Ctrl+T | Open the repository in a terminal |
Tabs, Zoom and Preferences (Ctrl+Tab, Ctrl+W, Ctrl+=, Ctrl+-, Ctrl+,) are VS Code’s own and work as usual.
The repository actions (checkout, fetch, pull, push, stash, tag, clone and the rest) are chords: press Ctrl+Alt+G (Cmd+Alt+G on macOS), release it, then press the letter. That leaves VS Code’s own Ctrl+P, Ctrl+B, Ctrl+Shift+P and the like alone. Outside those places VS Code’s own keys are untouched. To turn all of them off, clear
gitCheckout.shortcuts.enabled. To change one, run Git Checkout: Keyboard Shortcuts from the Command Palette. It opens VS Code’s Keyboard
Shortcuts editor filtered to this extension, where you can rebind or remove any of them like any other shortcut.