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.
Below is a list of some of the available keyboard shortcuts.
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 "About 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." |
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 |
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 the diff of a pull request." |
A | Show or hide annotations on diffs |
B | Open blame view. For more information, see "Tracing changes in 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+K (Mac) or Ctrl+K (Windows/Linux) | Inserts Markdown formatting for creating a link |
Command+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux) | Toggles between the Write and Preview comment tabs |
Command+Enter (Mac) or Ctrl+Enter (Windows/Linux) | Submits a comment |
Ctrl+. and then Ctrl+[saved reply number] | Opens saved replies menu and then autofills comment field with a saved reply. For more information, see "About saved replies." |
R | Quote the selected text in your reply. For more information, see "Basic writing and formatting syntax." |
Issue and pull request lists
Keyboard shortcut | Description |
---|---|
C | Create an issue |
Command+/ (Mac) or Ctrl+/ (Windows/Linux) | Focus your cursor on the issues or pull requests search bar. For more information, see "Filtering and searching issues and pull requests." |
U | Filter by author |
L | Filter by or edit labels. For more information, see "Filtering issues and pull requests by labels." |
Alt and click | While filtering by labels, exclude labels. For more information, see "Filtering issues and pull requests by labels." |
M | Filter by or edit milestones. For more information, see "Filtering issues and pull requests by milestone." |
A | Filter by or edit assignee. For more information, see "Filtering issues and pull requests by assignees." |
O or Enter | Open issue |
Issues and pull requests
Keyboard shortcut | Description |
---|---|
Q | Request a reviewer. For more information, see "Requesting a pull request review." |
M | Set a milestone. For more information, see "Associating milestones with issues and pull requests." |
L | Apply a label. For more information, see "Applying labels to issues and pull requests." |
A | Set an assignee. For more information, see "Assigning issues and pull requests to other GitHub users." |
X | Link an issue or pull request from the same repository. For more information, see "Linking a pull request to an issue." |
Command+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux) | Toggles between the Write and Preview tabs |
Changes in pull requests
Keyboard shortcut | Description |
---|---|
C | Open the list of commits in the pull request |
T | Open the list of changed files in the pull request |
J | Move selection down in the list |
K | Move selection up in the list |
Command+Shift+Enter | Add a single comment on a pull request diff |
Alt and click | Toggle between collapsing and expanding all outdated review comments in a pull request by holding down Alt and clicking Show outdated or Hide outdated. |
Click, then Shift and click | Comment on multiple lines of a pull request by clicking a line number, holding Shift, then clicking another line number. For more information, see "Commenting on a pull request." |
Project boards
Moving a column
Keyboard shortcut | Description |
---|---|
Enter or Space | Start moving the focused column |
Esc | Cancel the move in progress |
Enter | Complete the move in progress |
← or H | Move column to the left |
Command+← or Command+H (Mac) or Ctrl+← or Ctrl+H (Windows/Linux) | Move column to the leftmost position |
→ or L | Move column to the right |
Command+→ or Command+L (Mac) or Ctrl+→ or Ctrl+L (Windows/Linux) | Move column to the rightmost position |
Moving a card
Keyboard shortcut | Description |
---|---|
Enter or Space | Start moving the focused card |
Esc | Cancel the move in progress |
Enter | Complete the move in progress |
↓ or J | Move card down |
Command+↓ or Command+J (Mac) or Ctrl+↓ or Ctrl+J (Windows/Linux) | Move card to the bottom of the column |
↑ or K | Move card up |
Command+↑ or Command+K (Mac) or Ctrl+↑ or Ctrl+K (Windows/Linux) | Move card to the top of the column |
← or H | Move card to the bottom of the column on the left |
Shift+← or Shift+H | Move card to the top of the column on the left |
Command+← or Command+H (Mac) or Ctrl+← or Ctrl+H (Windows/Linux) | Move card to the bottom of the leftmost column |
Command+Shift+← or Command+Shift+H (Mac) or Ctrl+Shift+← or Ctrl+Shift+H (Windows/Linux) | Move card to the top of the leftmost column |
→ | Move card to the bottom of the column on the right |
Shift+→ or Shift+L | Move card to the top of the column on the right |
Command+→ or Command+L (Mac) or Ctrl+→ or Ctrl+L (Windows/Linux) | Move card to the bottom of the rightmost column |
Command+Shift+→ or Command+Shift+L (Mac) or Ctrl+Shift+→ or Ctrl+Shift+L (Windows/Linux) | Move card to the bottom of the rightmost column |
Previewing a card
Keyboard shortcut | Description |
---|---|
Esc | Close the card preview pane |
Notifications
Keyboard shortcut | Description |
---|---|
E | Mark as done |
Shift+U | Mark as unread |
Shift+I | Mark as read |
Shift+M | Unsubscribe |
Network graph
Keyboard shortcut | Description |
---|---|
← or H | Scroll left |
→ or L | Scroll right |
↑ or K | Scroll up |
↓ or J | Scroll down |
Shift+← (Mac) or Shift+H (Windows/Linux) | Scroll all the way left |
Shift+→ (Mac) or Shift+L (Windows/Linux) | Scroll all the way right |
Shift+↑ (Mac) or Shift+K (Windows/Linux) | Scroll all the way up |
Shift+↓ (Mac) or Shift+J (Windows/Linux) | Scroll all the way down |