Skip to content
Download

Keyboard shortcuts

Every command's key shows in its tooltip, and Settings › Keyboard shortcuts lists them all; Ctrl+/ (⌘/ on a Mac) opens that list.
You can change any of them there.

Settings on its Keyboard shortcuts page, listing each command with its keySettings on its Keyboard shortcuts page, listing each command with its key

Everywhere

CommandWindows and LinuxMac
Open repository…Ctrl+O⌘O
Undo your last Git action, outside a text boxCtrl+Z⌘Z
SearchCtrl+K⌘K
Show all commandsCtrl+Shift+P⌘⇧P
SettingsCtrl+,⌘,
BackAlt+←⌘[
ForwardAlt+→⌘]
Close the tabCtrl+W⌘W
Next tabCtrl+Tab or Ctrl+PageDownCtrl+Tab or ⌘⌥→
Previous tabCtrl+Shift+Tab or Ctrl+PageUpCtrl+Shift+Tab or ⌘⌥←
Show or hide the left dockCtrl+B⌘B
Show or hide the right dockCtrl+Alt+B⌘⌥B
Show or hide the bottom dockCtrl+J⌘J
Show keyboard shortcutsCtrl+/⌘/
Move to the next or previous part of the windowF6 or Shift+F6F6 or Shift+F6

In a tab row, ← and →, Home and End move between tabs, and F2 renames a tab that can be renamed.
On Windows and Linux, Alt or F10 reaches the menu bar.

History and branches

KeyWhereWhat it does
↑ and ↓HistoryMove from commit to commit.
Double-clickA branch, in the Repository viewSwitches to it.
Enter and EscapeA name you're typing, such as a branch'sKeep it, or cancel.
EscapeA branch dropped on anotherCloses the choices.

Interactive rebase

KeyWhat it does
↑ and ↓Move between rows.
Alt+↑ and Alt+↓Move the row up or down.
P, R, E, S, F, DSet the row to Pick, Reword, Edit, Squash, Fixup or Drop.

Terminal

CommandWindows and LinuxMac
New terminalCtrl+Shift+`Ctrl+Shift+`
Show or hide the terminalsCtrl+`Ctrl+`
CopyCtrl+Shift+C⌘C
Close the tab and end its shellCtrl+Shift+W
Open a linkCtrl+click⌘-click

In a terminal on Windows and Linux, Ctrl+Shift with a key runs the command that Ctrl with that key runs elsewhere, so the shell keeps Ctrl for itself.

Keys you can't take

Some keys stay with editing or with your system, and can't be given to a command:

  • Ctrl+A, C, V, X, Z and Y, and Ctrl+Shift+Z (⌘ on a Mac);
  • on a Mac, ⌘Q, ⌘H, ⌘M and ⌘Tab;
  • on Windows and Linux, Alt+F4 and Alt+Tab.