Keyboard Shortcuts for Navigating GitHub Repository Pages: The Essential Guide
GitHub provides hidden keyboard shortcuts that let you search files, switch branches, and create permalinks without touching your mouse.
The tiimgreen/github-cheat-sheet repository documents a powerful set of navigation shortcuts baked into GitHub's front-end JavaScript. These keyboard shortcuts for navigating GitHub repository pages work identically across code views, issue trackers, and pull request interfaces, enabling entirely mouse-free workflows on any modern browser.
Essential Navigation Shortcuts
The following shortcuts are active on every repository page and trigger instant UI actions by emitting the same DOM events as mouse clicks.
Jump to Any File (t)
Press t to open the file tree search dialog (also called "go to file"). Type any fragment of a filename to filter the repository tree instantly, even in large codebases with thousands of files. Press Enter to open the selected file.
Switch Branches or Tags (w)
Press w to open the branch selector dropdown. Use the arrow keys to navigate between branches and tags, then press Enter to checkout a different version of the repository without clicking the branch button.
Focus Global Search (s)
Press s to activate the repository-wide search field at the top of the page. Type your query and press Enter to search code, issues, or pull requests. Press the down arrow (↓) to expand the scope to "All GitHub" before searching.
Create Permalinks (y)
Press y while viewing any file to generate a permalink that references the specific commit SHA rather than the branch name. This freezes the view at the exact commit you are seeing and updates the browser URL to a stable, shareable link that will never break when the file changes.
Edit Issue Labels (l)
Press l when viewing an issue to open the label editor modal. Toggle labels on or off using the keyboard and press Enter to apply changes without leaving the issue page.
View All Shortcuts (?)
Press ? to display the full shortcut cheat sheet for the current page. This context-sensitive help dialog reveals page-specific shortcuts that only appear in certain views, such as issue lists or pull request diffs.
How GitHub Implements These Shortcuts
According to the source documentation in README.md, GitHub injects a JavaScript module when repository pages load. This module registers global keydown listeners that map specific key codes to UI actions by programmatically triggering DOM events. Because these shortcuts are handled entirely client-side, they function uniformly across all repository contexts—code tabs, issue lists, and pull request pages—without requiring server-side changes.
Practical Workflow Examples
Use these markdown notes to document the shortcuts for your team:
### Quick Navigation Cheat Sheet
- **Jump to a file** – Press `t`, type `README`, Enter → opens `README.md`.
- **Switch branches** – Press `w`, arrow-down to select branch, Enter.
- **Search the repo** – Press `s`, type `bug`, Enter → shows matches.
- **Create a permalink** – Press `y` while viewing a file → URL updates to commit-specific link.
- **Edit labels** – On an issue, press `l`, toggle labels, Enter.
- **Show help** – Press `?` → displays full shortcut list.
For compact documentation in a team wiki, use this one-liner:
t → file search • w → branch selector • s → repo search • l → edit labels • y → permalink • ? → shortcut help
Source Documentation
The complete reference for these shortcuts is maintained in the Keyboard Shortcuts section of README.md within the tiimgreen/github-cheat-sheet repository. This section provides the official descriptions and key bindings, while the accompanying screenshot offers a visual reference for quick lookup.
Summary
- Press
tto instantly search for files by name in any repository. - Use
wto switch branches andsto initiate searches without mouse clicks. - Create stable, shareable links with the
ypermalink shortcut. - Access page-specific shortcut lists anytime by pressing
?. - These shortcuts are implemented via client-side JavaScript in GitHub's UI and work uniformly across all repository pages.
Frequently Asked Questions
Do these keyboard shortcuts work on all GitHub pages?
Yes, these shortcuts are active on all modern repository pages including code views, issue trackers, and pull request interfaces. They are handled by GitHub's front-end JavaScript and function identically across all repository contexts because they register global keydown listeners when the page loads.
How do I see all available shortcuts for the current page?
Press the ? key to open a context-sensitive help dialog that displays every keyboard shortcut available on your current GitHub page. This includes page-specific commands that only appear in certain views, such as diff navigation shortcuts on pull request pages or timeline shortcuts on issue pages.
Can I use these shortcuts to create permanent links to specific code versions?
Yes. Pressing y while viewing any file converts the URL to a permalink that references the specific commit SHA rather than a branch name. This creates a stable link that will always show the exact version of the code you are viewing, even if the file is modified or deleted in future commits.
Where are these shortcuts documented in the source code?
The primary documentation appears in the README.md file of the tiimgreen/github-cheat-sheet repository under the Keyboard Shortcuts section. While the shortcuts themselves are implemented in GitHub's proprietary JavaScript bundle, the cheat sheet repository provides the comprehensive reference documentation and visual guides extracted from the official GitHub interface.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →