GitHub Shortcuts Cheatsheet

Keyboard shortcuts for github.com

Shortcuts
Contents
⌨️

General

?              Show keyboard shortcuts
S or /         Focus search bar
⌘K / Ctrl+K   Command palette
G N            Go to notifications
Esc            Close dialog/hovercard

# Command Palette (⌘K)
> command       Run command
# issue          Find issue
! PR             Find PR
@ user           Find user
filename         Find file
πŸ“

Repository Page

G C            Go to Code
G I            Go to Issues
G P            Go to Pull Requests
G A            Go to Actions
G B            Go to Projects (Board)
G W            Go to Wiki
G G            Go to Discussions

# File finder
T              Find file in repo
Type filename to filter

# Branch switcher
W              Switch branch/tag
πŸ’»

Code Browsing

T              File finder
L              Go to line
B              Blame view
Y              Permalink (canonical URL)

# File view
Click line #   Select line
Shift+click    Select range
Copy link β†’    Share specific lines

# Code search (new)
language:python  Filter by language
path:src/        Filter by path
repo:owner/name  Specific repo
symbol:funcName  Find symbol
πŸ“‹

Issues & Pull Requests

# Issue/PR list
C              Create new issue
⌘/ / Ctrl+/   Focus filter
U              Filter by author
L              Filter by label
M              Filter by milestone

# PR diff view
Click + drag     Select lines for comment
⌘Enter          Submit review comment

# Cross-references
#123             Link issue/PR
owner/repo#123   Cross-repo ref
@username        Mention user
fixes #123       Auto-close issue
closes #123      Auto-close issue
πŸ“

Web Editor

# github.dev (press . in any repo)
.              Open in web editor

# VS Code shortcuts work:
⌘P / Ctrl+P   Quick open file
βŒ˜β‡§P           Command palette
⌘S / Ctrl+S   Save file
βŒ˜β‡§E           Explorer sidebar
βŒ˜β‡§F           Search across files
βŒ˜β‡§G           Source control

# Codespaces
Code β†’ Codespaces β†’ Create
Full VS Code environment
Terminal, extensions, ports
πŸ“

Markdown Extras

# GitHub Flavored Markdown
- [x] Task complete
- [ ] Task pending

# Tables
| Col1 | Col2 |
|------|------|
| data | data |

# Alerts (new)
> [!NOTE]
> Informational

> [!TIP]
> Helpful advice

> [!WARNING]
> Potential issue

> [!CAUTION]
> Dangerous action

# Mermaid diagrams
```mermaid
graph LR
  A --> B
```

# Collapsible sections
<details><summary>Click</summary>
Hidden content
</details>