About keyboard shortcuts
Typing ? on GitHub brings up a dialog box that lists the keyboard shortcuts available for that page. You can use these keyboard shortcuts to perform actions across the site without using your mouse to navigate.
You can disable character key shortcuts, while still allowing shortcuts that use modifier keys, in your accessibility settings. For more information, see "Managing accessibility settings."
The following sections list some of the available keyboard shortcuts, organized by the pages where you can use them on your GitHub Enterprise Server instance.
Site wide shortcuts
| Keyboard shortcut | Description |
|---|---|
| S or / | Focus the search bar. For more information, see "About searching on GitHub." |
| G N | Go to your notifications. For more information, see "About notifications." |
| Esc | When focused on a user, issue, or pull request hovercard, closes the hovercard and refocuses on the element the hovercard is in |
Repositories
| Keyboard shortcut | Description |
|---|---|
| G C | Go to the Code tab |
| G I | Go to the Issues tab. For more information, see "About issues." |
| G P | Go to the Pull requests tab. For more information, see "About pull requests." |
| G A | Go to the Actions tab. For more information, see "Learn GitHub Actions." |
| G B | Go to the Projects tab. For more information, see "About project boards." |
| G W | Go to the Wiki tab. For more information, see "About wikis." |
| G G | Go to the Discussions tab. For more information, see "About discussions." |
Source code editing
| Keyboard shortcut | Description |
|---|---|
| Command+B (Mac) or Ctrl+B (Windows/Linux) | Inserts Markdown formatting for bolding text |
| Command+I (Mac) or Ctrl+I (Windows/Linux) | Inserts Markdown formatting for italicizing text |
| Command+K (Mac) or Ctrl+K (Windows/Linux) | Inserts Markdown formatting for creating a link |
| Command+Shift+7 (Mac) or Ctrl+Shift+7 (Windows/Linux) | Inserts Markdown formatting for an ordered list |
| Command+Shift+8 (Mac) or Ctrl+Shift+8 (Windows/Linux) | Inserts Markdown formatting for an unordered list |
| Command+Shift+. (Mac) or Ctrl+Shift+. (Windows/Linux) | Inserts Markdown formatting for a quote |
| E | Open source code file in the Edit file tab |
| Command+F (Mac) or Ctrl+F (Windows/Linux) | Start searching in file editor |
| Command+G (Mac) or Ctrl+G (Windows/Linux) | Find next |
| Command+Shift+G (Mac) or Ctrl+Shift+G (Windows/Linux) | Find previous |
| Command+Option+F (Mac) or Ctrl+Shift+F (Windows/Linux) | Replace |
| Command+Shift+Option+F (Mac) or Ctrl+Shift+R (Windows/Linux) | Replace all |
| Alt+G | Jump to line |
| Command+Z (Mac) or Ctrl+Z (Windows/Linux) | Undo |
| Command+Y (Mac) or Ctrl+Y (Windows/Linux) | Redo |
| Command+Shift+P | Toggles between the Edit file and Preview changes tabs |
| Command+S (Mac) or Ctrl+S (Windows/Linux) | Write a commit message |
For more keyboard shortcuts, see the CodeMirror documentation.
Source code browsing
| Keyboard shortcut | Description |
|---|---|
| T | Activates the file finder |
| L | Jump to a line in your code |
| W | Switch to a new branch or tag |
| Y | Expand a URL to its canonical form. For more information, see "Getting permanent links to files." |
| I | Show or hide comments on diffs. For more information, see "Commenting on a pull request." |
| A | Show or hide annotations on diffs |
| B | Open blame view. For more information, see "Viewing a file." |
Comments
| Keyboard shortcut | Description |
|---|---|
| Command+B (Mac) or Ctrl+B (Windows/Linux) | Inserts Markdown formatting for bolding text |
| Command+I (Mac) or Ctrl+I (Windows/Linux) | Inserts Markdown formatting for italicizing text |
| Command+E (Mac) or Ctrl+E (Windows/Linux) | Inserts Markdown formatting for code or a command within a line |
| Command+K (Mac) or Ctrl+K (Windows/Linux) | Inserts Markdown formatting for creating a link |
| Command+V (Mac) or Ctrl+V (Windows/Linux) | Creates a Markdown link when applied over highlighted text |
| Command+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux) | Toggles between the Write and Preview comment tabs |
| Command+Shift+V (Mac) or Ctrl+Shift+V (Windows/Linux) | Pastes HTML link as plain text |
| Command+Shift+Option+V (Mac) or Ctrl+Shift+Alt+V (Windows/Linux) | Pastes HTML link as plain text |
| Command+Shift+7 (Mac) or Ctrl+Shift+7 (Windows/Linux) | Inserts Markdown formatting for an ordered list |
| Command+Shift+8 (Mac) or Ctrl+Shift+8 (Windows/Linux) | Inserts Markdown formatting for an unordered list |