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.

Code 8

ActionWindows / LinuxMac
Open file finderWorks on repository code pages and puts the cursor in the file finder.TT
Jump to a lineWorks while viewing a file and moves the view to the line you specify.LL
Switch branch or tagOpens the branch and tag selector for the code you are browsing.WW
Expand URL to permalinkChanges the page address to its canonical form, which GitHub Docs ties to permanent file links.YY
Open blame viewSwitches the file you are viewing to its blame view.BB
Highlight current lineNeeds a cursor in the code view, which appears after you click a line of the file.Shift+JShift+J
Open line menuRequires a selected code line; its menu opens to the left of that line.Shift+Alt+CShift+Option+C
Highlight symbol occurrencesMarks every occurrence of the symbol under the cursor and lists it in the symbols pane.Ctrl+EnterCmd+Return

Editing files 12

The file editor accepts more keys than this table shows: GitHub Docs refers to the CodeMirror documentation for the rest.

ActionWindows / LinuxMac
Open file for editingOn a source file, switches to the Edit file tab so it can be changed in the browser.EE
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+FCmd+F
Find nextJumps to the following match of the current file-editor search.Ctrl+GCmd+G
Find previousSteps back to the match before the current one in the file editor.Ctrl+Shift+GCmd+Shift+G
Replace textFile-editor replace; the Mac binding uses Option where Windows and Linux use Shift.Ctrl+Shift+FCmd+Option+F
Replace allSwaps every match in the edited file; the two systems use different letters here.Ctrl+Shift+RCmd+Shift+Option+F
Jump to line in editorFile-editor counterpart of L; GitHub Docs prints one binding for every system.Alt+GOption+G
Undo editReverses the last change made in the file editor.Ctrl+ZCmd+Z
Redo editReapplies the change you just undid in the file editor.Ctrl+YCmd+Y
Write commit messageMoves from editing the file to entering the description of its commit.Ctrl+SCmd+S

Writing comments 15

ActionWindows / LinuxMac
Bold textAdds Markdown bold markers; listed for comment fields and for the file editor.Ctrl+BCmd+B
Italic textAdds Markdown italic markers in a comment field or in the file editor.Ctrl+ICmd+I
Inline codeMarks code inside a sentence; in the file editor it applies to Markdown files only.Ctrl+ECmd+E
Insert linkAdds the Markdown syntax for a link in a comment field or the file editor.Ctrl+KCmd+K
Paste as Markdown linkSelect text first: pasting over the selection turns it into a link.Ctrl+VCmd+V
Paste link as plain textPastes a copied HTML link without converting it to Markdown link syntax.Ctrl+Shift+VCmd+Shift+V
Paste link as plain textA second binding GitHub Docs lists for the same plain-text paste.Ctrl+Shift+Alt+VCmd+Shift+Option+V
Insert ordered listStarts numbered-list Markdown in a comment field or the file editor.Ctrl+Shift+7Cmd+Shift+7
Insert unordered listStarts bulleted-list Markdown in a comment field or the file editor.Ctrl+Shift+8Cmd+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+PCmd+Shift+P
Submit commentSends the comment from the keyboard while the cursor is still in the text field.Ctrl+EnterCmd+Return
Insert saved replyThe first chord shows your saved replies; Ctrl plus a reply's number then fills in that reply.Ctrl+.thenCtrl+numberCtrl+.thenCtrl+number
Insert suggestionUsed when reviewing a pull request to propose a specific change inside the comment.Ctrl+GCmd+G
Quote selection in replySelect text in the conversation first; it is copied into your reply as a quote.RR

Issue and pull request lists 8

ActionWindows / LinuxMac
Create issueStarts a new issue from the issue or pull request list.CC
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.UU
Filter by labelsOpens the label filter on a list; on an open issue the same key applies labels.LL
Exclude labelsWhile the label filter is open, hides items carrying the label you click.Alt+ClickOption+Click
Filter by milestonesOpens the milestone filter for the issue or pull request list.MM
Filter by assigneeNarrows the list to items assigned to the person you pick.AA
Open issueOpens an issue from the list; GitHub Docs gives the two keys as equals.OorEnterOorReturn

Issues and pull requests 11

ActionWindows / LinuxMac
Request a reviewerUsed on a pull request page to ask someone for a review.QQ
Set a milestoneOn an open issue or pull request, attaches it to a milestone.MM
Apply a labelOn an open issue or pull request, starts label selection for that item.LL
Set an assigneeOn an open issue or pull request, chooses who is responsible for it.AA
Link issue or pull requestOnly items that belong to the same repository can be linked this way.XX
Create sub-issueStarts a new issue nested under the issue you are viewing.Alt+Shift+COption+Shift+C
Add existing sub-issueAttaches an issue that already exists beneath the current one instead of creating it.Alt+Shift+AOption+Shift+A
Edit parent issueChanges which issue the current one sits under as a sub-issue.Alt+Shift+POption+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+ClickOption+Click
New issue from task, new tabLoads the issue form for a task-list item in another browser tab.Shift+ClickShift+Click
New issue from task, new windowLoads the issue form for a task-list item in a separate browser window.Ctrl+Shift+ClickCmd+Click

Pull request diffs 7

ActionWindows / LinuxMac
Open Commits menuOn the Files changed tab, picks which commits the diff includes.CC
Focus changed-files filterOn the Files changed tab, puts the cursor in the field that narrows the file list.TT
Toggle comments on diffsSwitches the review comments shown inside a diff between visible and hidden.II
Toggle annotations on diffsSwitches the annotations inside a diff between visible and hidden.AA
Submit review commentPosts the comment you wrote while reviewing the changed files.Ctrl+Shift+EnterCmd+Shift+Return
Toggle outdated commentsClick a Show outdated or Hide outdated link with the key held to affect every such thread.Alt+ClickOption+Click
Comment on multiple linesClick one line number, then hold Shift and click a second one to mark the range.ClickthenShift+ClickClickthenShift+Click

Projects 13

ActionWindows / LinuxMac
Focus filter fieldIn a project view, puts the cursor in the box that filters its items.Ctrl+FCmd+F
Move focus leftThe four arrow keys walk the focus across the cells or cards of a project view.LeftLeft
Move focus rightRightRight
Move focus upUpUp
Move focus downDownDown
Toggle cell edit modeStarts editing the focused cell, or leaves edit mode when it is already on.EnterReturn
Cancel cell editingLeaves the focused cell without keeping the edit in progress.EscEsc
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+SpaceShift+Space
Extend selection downGrows the selection by the next cell or card underneath.Shift+DownShift+Down
Extend selection upGrows the selection by the cell or card directly above.Shift+UpShift+Up
Open selected itemShows the project item that is currently selected.SpaceSpace
Archive selected itemsArchives every project item in the current selection.EE

Project board cards 11

ActionWindows / LinuxMac
Start moving cardsOn the board layout, picks up the selected card or cards so the arrow keys reposition them.EnterorShift+SpaceReturnorShift+Space
Complete card moveDrops the cards at their new position and ends the move.EnterReturn
Cancel card moveAbandons the move that is under way on the board.EscEsc
Move card downApplies to one card at a time, during a move started with Enter.DownDown
Move card to column bottomSends one card to the last position of its column.Ctrl+DownCmd+Down
Move card upRaises one card within its column during a move.UpUp
Move card to column topSends one card to the first position of its column.Ctrl+UpCmd+Up
Move cards leftShifts the picked-up card or cards into the neighbouring column on the left.LeftLeft
Move cards to leftmost columnJumps the picked-up cards across the board to its first column.Ctrl+LeftCmd+Left
Move cards rightShifts the picked-up card or cards into the neighbouring column on the right.RightRight
Move cards to rightmost columnJumps the picked-up cards across the board to its last column.Ctrl+RightCmd+Right

Actions 5

ActionWindows / LinuxMac
Go to workflow fileOpens the file that defines the workflow you are looking at.GthenFGthenF
Get workflow suggestionsWorks in the workflow editor and offers completions while you write the file.Ctrl+SpaceCmd+Space
Toggle log timestampsTurns the time stamps in a workflow run's log output on or off.Shift+TorTShift+TorT
Toggle full-screen logsExpands the log viewer of a workflow run to the whole window, or restores it.Shift+ForFShift+ForF
Exit full-screen logsReturns the log viewer to its normal size.EscEsc

Notifications 4

ActionWindows / LinuxMac
Mark as doneListed for the notifications inbox; flags the notification as finished.EE
Mark as unreadReturns a notification to the unread state.Shift+UShift+U
Mark as readSets the notification to read from the keyboard.Shift+IShift+I
Unsubscribe from updatesStops further notifications for the conversation behind this notification.Shift+MShift+M

Network graph 8

ActionWindows / LinuxMac
Scroll leftEither key pans the network graph to the left.LeftorHLeftorH
Scroll rightEither key pans the network graph to the right.RightorLRightorL
Scroll upEither key pans the network graph upwards.UporKUporK
Scroll downEither key pans the network graph downwards.DownorJDownorJ
Scroll to left edgeJumps to the graph's left end; the docs give an arrow key for Mac and a letter elsewhere.Shift+HShift+Left
Scroll to right edgeJumps to the graph's right end in one step.Shift+LShift+Right
Scroll to topJumps to the first row of the network graph.Shift+KShift+Up
Scroll to bottomJumps to the last row of the network graph.Shift+JShift+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.

ActionWindows / LinuxMac
Open command paletteScopes the palette to the page you are on; the feature preview has to be enabled first.Ctrl+KCmd+K
Open palette from Markdown fieldThe form to use while typing in a Markdown text field.Ctrl+Alt+KCmd+Option+K
Open palette in command modeSkips search mode and lists commands that fit the page you are on.Ctrl+Shift+KCmd+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.EnterReturn
Open result in new tabKeeps the current page and loads the chosen palette result in another browser tab.Ctrl+EnterCmd+Return
Copy result URLPuts the address of the highlighted palette result on the clipboard.Ctrl+CCmd+C
Clear palette scope and textEmpties the palette's scope path and input field, like its Clear button.Ctrl+BackspaceCmd+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.EscEsc

File preview on Mac Mac only 1

ActionWindows / LinuxMac
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

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.

Sources and checks

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.