Skip to content

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 LinuxmacOSAction
Ctrl+1Cmd+1Show Changes; pressed again, focus the commit message
Ctrl+2Cmd+2Show all commits; pressed again, jump to HEAD
Ctrl+0Cmd+0Reveal HEAD in the graph
Ctrl+Alt+Shift+KCtrl+Alt+Shift+KQuick Launch
Ctrl+FCmd+FSearch commits
F3, Shift+F3F3, Shift+F3Next, previous search result (Enter and Shift+Enter in the search field)
Ctrl+CCmd+CCopy the selected commit’s hash (in the Changes lists, the file path)
DeleteBackspaceRemove the selected commit’s branch or stash (also in the sidebar)
Ctrl+Shift+ACmd+Shift+AFilter the graph by the active branch
Ctrl+EnterCmd+EnterCommit
Ctrl+Shift+EnterCmd+Shift+EnterCommit and push
Ctrl+Shift+SCmd+SStage or unstage the selected files
Ctrl+Alt+Shift+SCmd+Alt+Shift+SStage all
Backspace, Ctrl+Shift+DBackspace, Cmd+Shift+DDiscard the selected files
Ctrl+OCmd+Alt+Shift+OOpen the selected file
Ctrl+DCmd+DOpen the selected file in the external diff tool
Ctrl+Alt+G, RCmd+Alt+G, RRefresh
Ctrl+Alt+G, NCmd+Alt+G, NClone a repository
Ctrl+Alt+G, Shift+NCmd+Alt+G, Shift+NInitialize a repository
Ctrl+Alt+G, OCmd+Alt+G, OOpen a repository
Ctrl+Alt+G, BCmd+Alt+G, BCheckout a branch
Ctrl+Alt+G, FCmd+Alt+G, FFetch
Ctrl+Alt+Shift+FCmd+Alt+Shift+FQuick Fetch: the tracked remote, no form
Ctrl+Alt+G, LCmd+Alt+G, LPull
Ctrl+Alt+Shift+LCmd+Alt+Shift+LQuick Pull
Ctrl+Alt+G, PCmd+Alt+G, PPush
Ctrl+Alt+Shift+PCmd+Alt+Shift+PQuick Push
Ctrl+Alt+G, Shift+BCmd+Alt+G, Shift+BNew branch
Ctrl+Alt+G, TCmd+Alt+G, TNew tag
Ctrl+Alt+G, HCmd+Alt+G, HSave stash
Ctrl+Alt+Shift+HCmd+Alt+Shift+HQuick Stash: stash everything, no form
Ctrl+Alt+OCmd+Ctrl+OReveal the repository in the file manager
Ctrl+Alt+TCmd+Ctrl+TOpen 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.