GitHub keyboard shortcuts for Windows, Linux and Mac
Keyboard shortcuts for the GitHub web interface (github.com), taken from GitHub Docs, with one column for Windows and Linux and one for Mac. Most are single letters or two-key sequences such as G, I, pressed one after the other; formatting keys in comment boxes use Ctrl or Cmd. GitHub Docs calls its list a selection: press ? on any page to see the keys for that page. GitHub Desktop, GitHub Mobile and the github.dev editor's keys are left out.
129 shortcuts in 14 sections.Checked row by row against GitHub Docs on .Edited by Jay.
Navigation 12
Single-character shortcuts can be switched off in your accessibility settings; shortcuts that use a modifier key keep working.
Action
Windows / Linux
Mac
Focus search barPuts the cursor in GitHub's search field from any page; either key works.
Sor/
Sor/
Go to notificationsA two-key sequence listed among the site-wide shortcuts: G first, then N.
GthenN
GthenN
Go to Code tabReturns to the repository's file listing from any of its other tabs.
GthenC
GthenC
Go to Issues tabOpens the issue list of the repository you are viewing.
GthenI
GthenI
Go to Pull requests tabOpens the pull request list of the current repository.
GthenP
GthenP
Go to Actions tabOpens the Actions tab of the current repository, where its workflows live.
GthenA
GthenA
Go to Wiki tabOpens the wiki pages of the repository you are viewing.
GthenW
GthenW
Go to Discussions tabPress G twice in a row to reach the repository's discussions.
GthenG
GthenG
Go to Security and quality tabOpens the tab GitHub labels Security and quality for the current repository.
GthenS
GthenS
Focus hovercardMoves keyboard focus from a page element onto the hovercard that belongs to it.
Alt+Up
Option+Up
Close hovercardWorks while a hovercard has focus and hands focus back to the element it came from.
Esc
Esc
Show keyboard shortcuts dialogOpens a dialog with the shortcuts that apply to the page you are on.
?
?
Code 8
Action
Windows / Linux
Mac
Open file finderWorks on repository code pages and puts the cursor in the file finder.
T
T
Jump to a lineWorks while viewing a file and moves the view to the line you specify.
L
L
Switch branch or tagOpens the branch and tag selector for the code you are browsing.
W
W
Expand URL to permalinkChanges the page address to its canonical form, which GitHub Docs ties to permanent file links.
Y
Y
Open blame viewSwitches the file you are viewing to its blame view.
B
B
Highlight current lineNeeds a cursor in the code view, which appears after you click a line of the file.
Shift+J
Shift+J
Open line menuRequires a selected code line; its menu opens to the left of that line.
Shift+Alt+C
Shift+Option+C
Highlight symbol occurrencesMarks every occurrence of the symbol under the cursor and lists it in the symbols pane.
Ctrl+Enter
Cmd+Return
Editing files 12
The file editor accepts more keys than this table shows: GitHub Docs refers to the CodeMirror documentation for the rest.
Action
Windows / Linux
Mac
Open file for editingOn a source file, switches to the Edit file tab so it can be changed in the browser.
E
E
Open in github.dev editorReplaces the current tab with the web-based editor; requires being signed in.
.
.
Open github.dev in new tabSame web editor as the period key, but started in a separate browser tab.
>
>
Search in file editorStarts a text search inside the file you are editing.
Ctrl+F
Cmd+F
Find nextJumps to the following match of the current file-editor search.
Ctrl+G
Cmd+G
Find previousSteps back to the match before the current one in the file editor.
Ctrl+Shift+G
Cmd+Shift+G
Replace textFile-editor replace; the Mac binding uses Option where Windows and Linux use Shift.
Ctrl+Shift+F
Cmd+Option+F
Replace allSwaps every match in the edited file; the two systems use different letters here.
Ctrl+Shift+R
Cmd+Shift+Option+F
Jump to line in editorFile-editor counterpart of L; GitHub Docs prints one binding for every system.
Alt+G
Option+G
Undo editReverses the last change made in the file editor.
Ctrl+Z
Cmd+Z
Redo editReapplies the change you just undid in the file editor.
Ctrl+Y
Cmd+Y
Write commit messageMoves from editing the file to entering the description of its commit.
Ctrl+S
Cmd+S
Writing comments 15
Action
Windows / Linux
Mac
Bold textAdds Markdown bold markers; listed for comment fields and for the file editor.
Ctrl+B
Cmd+B
Italic textAdds Markdown italic markers in a comment field or in the file editor.
Ctrl+I
Cmd+I
Inline codeMarks code inside a sentence; in the file editor it applies to Markdown files only.
Ctrl+E
Cmd+E
Insert linkAdds the Markdown syntax for a link in a comment field or the file editor.
Ctrl+K
Cmd+K
Paste as Markdown linkSelect text first: pasting over the selection turns it into a link.
Ctrl+V
Cmd+V
Paste link as plain textPastes a copied HTML link without converting it to Markdown link syntax.
Ctrl+Shift+V
Cmd+Shift+V
Paste link as plain textA second binding GitHub Docs lists for the same plain-text paste.
Ctrl+Shift+Alt+V
Cmd+Shift+Option+V
Insert ordered listStarts numbered-list Markdown in a comment field or the file editor.
Ctrl+Shift+7
Cmd+Shift+7
Insert unordered listStarts bulleted-list Markdown in a comment field or the file editor.
Ctrl+Shift+8
Cmd+Shift+8
Insert quoteAdds Markdown quote syntax; listed for comment fields and for the file editor.
Ctrl+Shift+.
Cmd+Shift+.
Toggle Write and PreviewSwitches a comment box between its Write tab and the rendered Preview tab.
Ctrl+Shift+P
Cmd+Shift+P
Submit commentSends the comment from the keyboard while the cursor is still in the text field.
Ctrl+Enter
Cmd+Return
Insert saved replyThe first chord shows your saved replies; Ctrl plus a reply's number then fills in that reply.
Ctrl+.thenCtrl+number
Ctrl+.thenCtrl+number
Insert suggestionUsed when reviewing a pull request to propose a specific change inside the comment.
Ctrl+G
Cmd+G
Quote selection in replySelect text in the conversation first; it is copied into your reply as a quote.
R
R
Issue and pull request lists 8
Action
Windows / Linux
Mac
Create issueStarts a new issue from the issue or pull request list.
C
C
Focus list search barPuts the cursor in the search field that filters the issue or pull request list.
Ctrl+/
Cmd+/
Filter by authorOpens the author filter of the list you are viewing.
U
U
Filter by labelsOpens the label filter on a list; on an open issue the same key applies labels.
L
L
Exclude labelsWhile the label filter is open, hides items carrying the label you click.
Alt+Click
Option+Click
Filter by milestonesOpens the milestone filter for the issue or pull request list.
M
M
Filter by assigneeNarrows the list to items assigned to the person you pick.
A
A
Open issueOpens an issue from the list; GitHub Docs gives the two keys as equals.
OorEnter
OorReturn
Issues and pull requests 11
Action
Windows / Linux
Mac
Request a reviewerUsed on a pull request page to ask someone for a review.
Q
Q
Set a milestoneOn an open issue or pull request, attaches it to a milestone.
M
M
Apply a labelOn an open issue or pull request, starts label selection for that item.
L
L
Set an assigneeOn an open issue or pull request, chooses who is responsible for it.
A
A
Link issue or pull requestOnly items that belong to the same repository can be linked this way.
X
X
Create sub-issueStarts a new issue nested under the issue you are viewing.
Alt+Shift+C
Option+Shift+C
Add existing sub-issueAttaches an issue that already exists beneath the current one instead of creating it.
Alt+Shift+A
Option+Shift+A
Edit parent issueChanges which issue the current one sits under as a sub-issue.
Alt+Shift+P
Option+Shift+P
New issue from task, same tabHold the key and click the icon at the task's upper-right corner inside a task list.
Alt+Click
Option+Click
New issue from task, new tabLoads the issue form for a task-list item in another browser tab.
Shift+Click
Shift+Click
New issue from task, new windowLoads the issue form for a task-list item in a separate browser window.
Ctrl+Shift+Click
Cmd+Click
Pull request diffs 7
Action
Windows / Linux
Mac
Open Commits menuOn the Files changed tab, picks which commits the diff includes.
C
C
Focus changed-files filterOn the Files changed tab, puts the cursor in the field that narrows the file list.
T
T
Toggle comments on diffsSwitches the review comments shown inside a diff between visible and hidden.
I
I
Toggle annotations on diffsSwitches the annotations inside a diff between visible and hidden.
A
A
Submit review commentPosts the comment you wrote while reviewing the changed files.
Ctrl+Shift+Enter
Cmd+Shift+Return
Toggle outdated commentsClick a Show outdated or Hide outdated link with the key held to affect every such thread.
Alt+Click
Option+Click
Comment on multiple linesClick one line number, then hold Shift and click a second one to mark the range.
ClickthenShift+Click
ClickthenShift+Click
Projects 13
Action
Windows / Linux
Mac
Focus filter fieldIn a project view, puts the cursor in the box that filters its items.
Ctrl+F
Cmd+F
Move focus leftThe four arrow keys walk the focus across the cells or cards of a project view.
Left
Left
Move focus right
Right
Right
Move focus up
Up
Up
Move focus down
Down
Down
Toggle cell edit modeStarts editing the focused cell, or leaves edit mode when it is already on.
Enter
Return
Cancel cell editingLeaves the focused cell without keeping the edit in progress.
Esc
Esc
Open row actions menuBrings up the list of things you can do with a project row.
Ctrl+Shift+\
Cmd+Shift+\
Select itemMarks the focused project item as selected.
Shift+Space
Shift+Space
Extend selection downGrows the selection by the next cell or card underneath.
Shift+Down
Shift+Down
Extend selection upGrows the selection by the cell or card directly above.
Shift+Up
Shift+Up
Open selected itemShows the project item that is currently selected.
Space
Space
Archive selected itemsArchives every project item in the current selection.
E
E
Project board cards 11
Action
Windows / Linux
Mac
Start moving cardsOn the board layout, picks up the selected card or cards so the arrow keys reposition them.
EnterorShift+Space
ReturnorShift+Space
Complete card moveDrops the cards at their new position and ends the move.
Enter
Return
Cancel card moveAbandons the move that is under way on the board.
Esc
Esc
Move card downApplies to one card at a time, during a move started with Enter.
Down
Down
Move card to column bottomSends one card to the last position of its column.
Ctrl+Down
Cmd+Down
Move card upRaises one card within its column during a move.
Up
Up
Move card to column topSends one card to the first position of its column.
Ctrl+Up
Cmd+Up
Move cards leftShifts the picked-up card or cards into the neighbouring column on the left.
Left
Left
Move cards to leftmost columnJumps the picked-up cards across the board to its first column.
Ctrl+Left
Cmd+Left
Move cards rightShifts the picked-up card or cards into the neighbouring column on the right.
Right
Right
Move cards to rightmost columnJumps the picked-up cards across the board to its last column.
Ctrl+Right
Cmd+Right
Actions 5
Action
Windows / Linux
Mac
Go to workflow fileOpens the file that defines the workflow you are looking at.
GthenF
GthenF
Get workflow suggestionsWorks in the workflow editor and offers completions while you write the file.
Ctrl+Space
Cmd+Space
Toggle log timestampsTurns the time stamps in a workflow run's log output on or off.
Shift+TorT
Shift+TorT
Toggle full-screen logsExpands the log viewer of a workflow run to the whole window, or restores it.
Shift+ForF
Shift+ForF
Exit full-screen logsReturns the log viewer to its normal size.
Esc
Esc
Notifications 4
Action
Windows / Linux
Mac
Mark as doneListed for the notifications inbox; flags the notification as finished.
E
E
Mark as unreadReturns a notification to the unread state.
Shift+U
Shift+U
Mark as readSets the notification to read from the keyboard.
Shift+I
Shift+I
Unsubscribe from updatesStops further notifications for the conversation behind this notification.
Shift+M
Shift+M
Network graph 8
Action
Windows / Linux
Mac
Scroll leftEither key pans the network graph to the left.
LeftorH
LeftorH
Scroll rightEither key pans the network graph to the right.
RightorL
RightorL
Scroll upEither key pans the network graph upwards.
UporK
UporK
Scroll downEither key pans the network graph downwards.
DownorJ
DownorJ
Scroll to left edgeJumps to the graph's left end; the docs give an arrow key for Mac and a letter elsewhere.
Shift+H
Shift+Left
Scroll to right edgeJumps to the graph's right end in one step.
Shift+L
Shift+Right
Scroll to topJumps to the first row of the network graph.
Shift+K
Shift+Up
Scroll to bottomJumps to the last row of the network graph.
Shift+J
Shift+Down
Command palette 14
The command palette is a public preview and is switched off by default; turn it on under feature preview before these keys do anything.
The opening shortcuts can be reassigned in the Accessibility section of your settings, and the reassigned keys then also close the palette.
Action
Windows / Linux
Mac
Open command paletteScopes the palette to the page you are on; the feature preview has to be enabled first.
Ctrl+K
Cmd+K
Open palette from Markdown fieldThe form to use while typing in a Markdown text field.
Ctrl+Alt+K
Cmd+Option+K
Open palette in command modeSkips search mode and lists commands that fit the page you are on.
Ctrl+Shift+K
Cmd+Shift+K
Enter command modeTyped in a palette that is already open in navigation or search mode.
>
>
Search issues and pull requestsTyped as a prefix in the palette; discussions and projects are searched as well.
#
#
Search users and organizationsTyped as a prefix in the palette; repositories are included in the results.
@
@
Search files or repositoriesResults depend on scope: files when a repository is set, repositories when an organization is.
/
/
Search projects onlyTyped as a prefix in the palette to limit results to projects.
!
!
Open highlighted resultGoes to the result under the highlight, or executes it when it is a command.
Enter
Return
Open result in new tabKeeps the current page and loads the chosen palette result in another browser tab.
Ctrl+Enter
Cmd+Return
Copy result URLPuts the address of the highlighted palette result on the clipboard.
Ctrl+C
Cmd+C
Clear palette scope and textEmpties the palette's scope path and input field, like its Clear button.
Ctrl+Backspace
Cmd+Delete
Show palette helpInside the palette this key lists its own help instead of the site-wide dialog.
?
?
Close command paletteWorks in every palette mode; the shortcut that opened the palette also closes it.
Esc
Esc
File preview on Mac Mac only1
Action
Windows / Linux
Mac
Toggle Edit and Preview tabsGitHub Docs lists this file-editor key with a Mac binding only; it flips between editing and previewing changes.
—
Cmd+Shift+P
No row on this page matches that filter.
Notes
Finding things
S focuses the search box from any page. On a repository, T opens the file finder, which fuzzy-matches paths as you type — the fastest way into a large repo — and W opens the branch switcher. Inside a file, L jumps to a line number, B shows blame, and Y rewrites the URL into a permalink pinned to the current commit, which is what you should paste into an issue so the link still points at the right lines after later commits.
Go-to sequences
Press G and then a letter to move around a repository: G, C code, G, I issues, G, P pull requests, G, A actions, G, W wiki, G, G discussions, and G, N notifications from anywhere on GitHub. In the notifications inbox E marks a notification as done and Shift + U marks it unread. C creates an issue from the issues list.
Writing comments
In any Markdown field, Ctrl + Enter submits the comment, Ctrl + Shift + P toggles the preview, and Ctrl + K inserts a link around the selection; Ctrl + B and Ctrl + I apply bold and italic. Typing # or @ opens a picker for issues and people, and dragging an image into the field uploads it. On macOS the Ctrl combinations become Cmd.
Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.
2 rows from the earlier version of this page were removed in that check: duplicates, and bindings the documentation does not list or lists differently.
Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.