Skip to main content

Keyboard shortcuts

Nearly every page on GitHub has a keyboard shortcut to perform actions faster.

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 GitHub.

Site wide shortcuts

Keyboard shortcutDescription
S or /Focus the search bar. For more information, see About searching on GitHub.
G NGo to your notifications. For more information, see About notifications.
Option+ (Mac) or
Alt+ (Windows/Linux)
Move focus from an element to its hovercard
EscWhen focused on a user, issue, or pull request hovercard, closes the hovercard and refocuses on the element the hovercard is in

Repositories

Keyboard shortcutDescription
G CGo to the Code tab
G IGo to the Issues tab. For more information, see About issues.
G PGo to the Pull requests tab. For more information, see Pull requests.
G AGo to the Actions tab. For more information, see Writing workflows.
G WGo to the Wiki tab. For more information, see About wikis.
G GGo to the Discussions tab. For more information, see About discussions.
G SGo to the repository's Security tab. For more information, see GitHub security features.

Source code editing

Keyboard shortcutDescription
Command+B (Mac) or
Ctrl+B (Windows/Linux)
Inserts Markdown formatting for bolding text
Command+E (Mac) or
Ctrl+E (Windows/Linux)
Inserts Markdown formatting for a code one-liner. The browser's default behavior is used for other file types
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
EOpen 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+GJump to line
Command+Z (Mac) or
Ctrl+Z (Windows/Linux)
Undo
Command+Y (Mac) or
Ctrl+Y (Windows/Linux)
Redo
Command+Shift+PToggles 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 shortcutDescription
tActivates the file finder
lJump to a line in your code