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.


Everywhere
| Command | Windows and Linux | Mac |
|---|---|---|
| Open repository… | Ctrl+O | ⌘O |
| Undo your last Git action, outside a text box | Ctrl+Z | ⌘Z |
| Search | Ctrl+K | ⌘K |
| Show all commands | Ctrl+Shift+P | ⌘⇧P |
| Settings | Ctrl+, | ⌘, |
| Back | Alt+← | ⌘[ |
| Forward | Alt+→ | ⌘] |
| Close the tab | Ctrl+W | ⌘W |
| Next tab | Ctrl+Tab or Ctrl+PageDown | Ctrl+Tab or ⌘⌥→ |
| Previous tab | Ctrl+Shift+Tab or Ctrl+PageUp | Ctrl+Shift+Tab or ⌘⌥← |
| Show or hide the left dock | Ctrl+B | ⌘B |
| Show or hide the right dock | Ctrl+Alt+B | ⌘⌥B |
| Show or hide the bottom dock | Ctrl+J | ⌘J |
| Show keyboard shortcuts | Ctrl+/ | ⌘/ |
| Move to the next or previous part of the window | F6 or Shift+F6 | F6 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
| Key | Where | What it does |
|---|---|---|
| ↑ and ↓ | History | Move from commit to commit. |
| Double-click | A branch, in the Repository view | Switches to it. |
| Enter and Escape | A name you're typing, such as a branch's | Keep it, or cancel. |
| Escape | A branch dropped on another | Closes the choices. |
Interactive rebase
| Key | What it does |
|---|---|
| ↑ and ↓ | Move between rows. |
| Alt+↑ and Alt+↓ | Move the row up or down. |
| P, R, E, S, F, D | Set the row to Pick, Reword, Edit, Squash, Fixup or Drop. |
Terminal
| Command | Windows and Linux | Mac |
|---|---|---|
| New terminal | Ctrl+Shift+` | Ctrl+Shift+` |
| Show or hide the terminals | Ctrl+` | Ctrl+` |
| Copy | Ctrl+Shift+C | ⌘C |
| Close the tab and end its shell | Ctrl+Shift+W | |
| Open a link | Ctrl+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.