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 GitHub Command Palette also gives you quick access to a wide range of actions, without the need to remember keyboard shortcuts. For more information, see GitHub Command Palette.
The following sections list some of the available keyboard shortcuts, organized by the pages where you can use them on GitHub.
Opens a repository or pull request in the github.dev editor, in the same browser tab. You must be signed in to use the editor. For more information, see The github.dev web-based editor.
>
Opens a repository or pull request in the github.dev editor, in a new browser tab. You must be signed in to use the editor. For more information, see The github.dev web-based editor.
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
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
If you view a code file in a repository using the Code view and click on any line in the file, you will see a cursor. You can then navigate within the content of the file, also known as a blob (binary large object), using keyboard shortcuts.
Keyboard shortcut
Description
Shift+J
Highlights the line that is currently selected by the cursor within the code file
Shift+Option+C (Mac) or Shift+Alt+C (Windows/Linux)
If a line of code is currently selected, this shortcut opens the line menu for that line, appearing under to the left of the line
Command+Enter (Mac) or Control+Enter (Windows/Linux)
Highlights the code symbol currently selected by the cursor and all other occurrences of the symbol in the code, and shows the symbol in the symbols pane
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
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.
Command+Shift+. (Mac) or Ctrl+Shift+. (Windows/Linux)
Command+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
Toggles between the Write and Preview tabs
Alt and click
When creating an issue from a task list, open the new issue form in the current tab by holding Alt and clicking the in the upper-right corner of the task. For more information, see About tasklists.
Shift and click
When creating an issue from a task list, open the new issue form in a new tab by holding Shift and clicking the in the upper-right corner of the task. For more information, see About tasklists.
Command and click (Mac) or Ctrl+Shift and click (Windows/Linux)
When creating an issue from a task list, open the new issue form in the new window by holding Command or Ctrl+Shift and clicking the in the upper-right corner of the task. For more information, see About tasklists.
Option+Shift+c (Mac) or Alt+Shift+c (Windows/Linux)
Open the Commits dropdown menu to filter which commits are shown in the diffs
T
Move your cursor to the "Filter changed files" field
Command+Shift+Enter (Mac) or Ctrl+Shift+Enter (Windows/Linux)
Submit a review comment
Option and click (Mac) or Alt and click (Windows/Linux)
Toggle between collapsing and expanding all outdated or resolved review comments in a pull request (for example, 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.