GitHub keyboard shortcuts for Mac
57 shortcuts · Updated
These are the default GitHub keyboard shortcuts on a Mac, curated from GitHub's official documentation for github.com in the browser (not GitHub Desktop). Most of them are single letters with no modifier: t opens the file finder, w switches branches, y turns the URL into a permanent link, b opens blame, and . opens the repository in the github.dev editor. Where a shortcut does use a modifier, the Mac version uses Command or Option in place of Ctrl or Alt, and pressing ? on any page shows the keys that page supports.
Nothing matches - try fewer letters, or an action word like "close" or "split".
Or stop looking them up. Put the GitHub commands you actually use on your Super key with Super Shortcuts. Hold it to see what you've added for the app you're in, and tap a key to run one.
Download for macOSGetting around9
| Shortcut | Action |
|---|---|
| ?? | Show the keyboard shortcuts for the current page |
| // | Focus the search bar (S works too) |
| G, then NGN | Go to your notifications |
| G, then CGC | Go to the repository's Code tab |
| G, then IGI | Go to the Issues tab |
| G, then PGP | Go to the Pull requests tab |
| G, then AGA | Go to the Actions tab |
| G, then GGG | Go to the Discussions tab |
| G, then WGW | Go to the Wiki tab |
Browsing code11
| Shortcut | Action |
|---|---|
| TT | Open the file finder |
| WW | Switch to another branch or tag |
| YY | Expand the URL to its permanent (canonical) form |
| BB | Open blame view |
| LL | Jump to a line in the file |
| .. | Open the repository or pull request in github.dev, same tab |
| >> | Open the repository or pull request in github.dev, new tab |
| EE | Open the current file in the Edit file tab |
| Shift J⇧J | Highlight the line the cursor is on |
| Shift Option C⇧⌥C | Open the line menu for the selected line |
| Command Return⌘↩ | Highlight every occurrence of the symbol under the cursor |
Writing comments14
| Shortcut | Action |
|---|---|
| Command B⌘B | Bold |
| Command I⌘I | Italic |
| Command E⌘E | Inline code |
| Command K⌘K | Insert a link |
| Command V⌘V | Paste a URL over selected text to make it a link |
| Command Shift V⌘⇧V | Paste an HTML link as plain text |
| Command Shift 7⌘⇧7 | Numbered list |
| Command Shift 8⌘⇧8 | Bulleted list |
| Command Shift .⌘⇧. | Quote |
| Command G⌘G | Insert a suggestion in a review comment |
| RR | Quote the selected text in your reply |
| Control ., then Control 1⌃.⌃1 | Insert saved reply 1 (any number works) |
| Command Shift P⌘⇧P | Toggle between Write and Preview |
| Command Return⌘↩ | Submit the comment |
Issues & pull requests11
| Shortcut | Action |
|---|---|
| CC | Create an issue (from the issue list) |
| Command /⌘/ | Focus the issues or pull requests search bar |
| UU | Filter the list by author |
| OO | Open the selected issue (Return works too) |
| Request a reviewer | |
| AA | Set an assignee (or filter by assignee on a list) |
| LL | Apply a label (or filter by label on a list) |
| MM | Set a milestone (or filter by milestone on a list) |
| XX | Link an issue or pull request from the same repository |
| Option Shift C⌥⇧C | Create a new sub-issue |
| Option Shift P⌥⇧P | Edit the parent issue |
Reviewing changes5
| Shortcut | Action |
|---|---|
| TT | Jump to the Filter changed files field |
| CC | Open the Commits menu to pick which commits the diff shows |
| Command Shift Return⌘⇧↩ | Submit a review comment |
| Click, then Shift ClickClick⇧Click | Comment on several lines: click one line number, then Shift-click another |
| Option Click⌥Click | Expand or collapse all outdated or resolved comments |
Actions & notifications7
| Shortcut | Action |
|---|---|
| G, then FGF | Go to the workflow file |
| TT | Toggle timestamps in the logs |
| FF | Toggle full-screen logs |
| EE | Mark a notification as done |
| Shift U⇧U | Mark as unread |
| Shift I⇧I | Mark as read |
| Shift M⇧M | Unsubscribe |
Curated from the official GitHub Docs - Keyboard shortcuts. Defaults only - shortcuts you've remapped will differ.
Frequently asked questions
How do I see all GitHub keyboard shortcuts?
Press ? on any GitHub page. It opens a dialog listing the shortcuts available on that page, so the list changes between a repository, a pull request and your notifications.
Can I turn off GitHub's single-letter shortcuts?
Yes. In your GitHub accessibility settings you can disable character key shortcuts (the single letters like t, w and g n) while keeping the shortcuts that use modifier keys, such as ⌘B for bold.
What does pressing the period key do on GitHub?
. opens the repository or pull request in the github.dev editor (VS Code for the Web) in the same browser tab, and > opens it in a new tab. You must be signed in to use the editor.
Does GitHub have a command palette?
Yes, but it is off by default; turn it on in feature preview. On a Mac, ⌘K opens it in search mode and ⌘⇧K in command mode. While editing Markdown text, open it with ⌘⌥K instead. You can change these keys in the Accessibility section of your settings.
Templates for GitHub
Ready-made Super Shortcuts commands for GitHub, each with its steps spelled out before you install it.