Keyhab
t
GitHub

GitHub Keyboard Shortcuts: Navigate Repos, Review PRs and Triage Issues Faster

The GitHub.com keyboard shortcuts worth knowing, organized into Basics, Intermediate and Advanced — from jumping between tabs and finding files to reviewing pull requests and triaging issues.

Why learn GitHub shortcuts

Almost every page on GitHub.com has keyboard shortcuts, but most people never press anything beyond Cmd + Enter. Learning a handful of them makes the daily loop — find a file, open a pull request, leave a review, label an issue — noticeably faster.

This guide groups the GitHub.com shortcuts into three levels: Basics, Intermediate and Advanced. Everything here comes from GitHub's own keyboard shortcut documentation. Press ? on any GitHub page to see the shortcuts available there.

Most GitHub shortcuts are single keys or two-key sequences. For a sequence like g c, press g, release it, then press c.

The five to learn first

  • t — Open the file finder in a repository
  • s or / — Focus the search bar
  • g p — Go to the Pull requests tab
  • y — Turn the current URL into a permanent link
  • . — Open the repository or pull request in the github.dev editor

y is the one people wish they had known sooner. It rewrites the URL to point at the exact commit, so a link to a line of code never breaks when the branch moves on.

Basics: moving around

ShortcutAction
s or /Focus the search bar
?Show the shortcuts for this page
g cGo to the Code tab
g iGo to the Issues tab
g pGo to the Pull requests tab
g aGo to the Actions tab
g wGo to the Wiki tab
g nGo to your notifications

Basics: browsing code

ShortcutAction
tActivate the file finder
lJump to a line
wSwitch branch or tag
yExpand the URL to its permanent (commit) form
bOpen the blame view
.Open in the github.dev editor
>Open in the github.dev editor in a new tab

Intermediate: writing comments

These work in any comment box — issues, pull requests and review comments.

ActionMacWindows / Linux
BoldCmd + BCtrl + B
ItalicCmd + ICtrl + I
Inline codeCmd + ECtrl + E
Insert linkCmd + KCtrl + K
QuoteCmd + Shift + .Ctrl + Shift + .
Numbered listCmd + Shift + 7Ctrl + Shift + 7
Bulleted listCmd + Shift + 8Ctrl + Shift + 8
Toggle Write / PreviewCmd + Shift + PCtrl + Shift + P
Submit commentCmd + EnterCtrl + Enter

A small trick: select text in someone's comment and press r to quote it in your reply.

Intermediate: issues and pull requests

ShortcutAction
cCreate an issue (from the issue list)
o or EnterOpen the selected issue
aSet an assignee
lApply a label
mSet a milestone
qRequest a reviewer
xLink an issue or pull request from the same repository

Advanced: reviewing pull requests

On the Files changed tab of a pull request:

ActionMacWindows / Linux
Filter changed filestt
Open the commits menucc
Submit a review commentCmd + Shift + EnterCtrl + Shift + Enter
Comment on multiple linesClick, then Shift + clickClick, then Shift + click

Advanced: notifications and Actions

ShortcutAction
eMark notification as done
Shift + uMark as unread
Shift + iMark as read
Shift + mUnsubscribe
g fGo to the workflow file (Actions run page)
Shift + tToggle timestamps in logs
Shift + fToggle full-screen logs

How to make them stick

Because GitHub shortcuts are mostly single letters, they are easy to press and easy to forget. Pick the three that match what you do most — t for reading code, g p and Cmd + Shift + Enter for reviewing — and use them deliberately for a week before adding more.

For why testing yourself works better than rereading a list, see How to memorize keyboard shortcuts.

t

Learn GitHub shortcuts with quick quizzes

Keyhab quizzes you on 1,050 shortcuts for 15 tools, from Basics to Advanced. Five minutes a day on iPhone or iPad — VSCode (Mac) and Vim Basics are free.

Download free on the App Store

Related