Want to receive content like this twice a month, right in your inbox? Sign up for the newsletter now >
A short guide to mastering keyboard shortcuts on GitHub
Say goodbye to constant mouse clicking and hello to seamless navigation with GitHub shortcuts.
This is abridged content from November 2023’s Insider newsletter. Like what you see? Sign up for the newsletter to receive complete, unabridged content in your inbox twice a month. Sign up now > |
Did you know that just about every page on GitHub has a keyboard shortcut? In this blog post, we’ll uncover the world of GitHub keyboard shortcuts and how they can help you navigate and perform actions swiftly. ⌨️
After reading this post, you’ll be able to:
💡 Master the shortcuts. You might be asking, how can I access said shortcuts? Simply by typing “?” on any Github page!* These shortcuts will empower you to perform various actions across the site without relying on your mouse.
🔧 Customize your experience. You can tailor your shortcut experience by enabling or disabling character key shortcuts according to your preferences, all within your accessibility settings. For more information, see “Managing accessibility settings.”
🎩 Make magic. With the GitHub Command Palette, you can effortlessly navigate, search, and execute commands on GitHub—all without the need to memorize multiple keyboard combinations. To open the command palette, type in this combination:
- Windows and Linux: “Ctrl+K” or “Ctrl+Alt+K”
- Mac: “Command+K” or “Command+Option+K”
Please note: not all shortcuts are available on every page. When you open the shortcut window (?), it will provide you with the available keyboard shortcuts.
Ready to give your mouse a break? Let’s dive into some top keyboard shortcuts to get you started.
🚀 Navigation
Tap these keys to navigate your way around our platform with ease:
T: Quick access to “File Finder.”
W: Close the currently open tab or pull request.
S: Focus on the site search bar.
G, P: Jump to your profile.
📂 Repository navigation
These shortcuts will guide you through your repositories:
G, I: Jump to your issues.
G, P: Navigate to your pull requests.
G, B: Head to your repository.
G, C: Visit your repository’s code.
📝 Issues and pull requests
Spin up issues and pull requests with one single keystroke:
C: Create a new issue.
Y: Close an issue or pull request.
R: Reopen a closed issue or pull request.
K: Move up the discussion timeline.
J: Move down the discussion timeline.
🔍 Search
Quickly spin up a search bar to find what you need right when you need it:
/: Start a quick search.
S: Focus on the site search bar.
F: Search within the code in a repository.
T: File finder for code search.
W: View code in a workspace.
📎 Notifications
Stay on top of your projects with a hop on over to your notifications:
G, N: Go to your notifications.
📤 Create and submit
Spin up a new repository or view your issues in a flash:
N: Create a new repository.
I: Go to your issues.
P: Navigate to your pull requests.
B: Visit your repository.
🔒 Security
Keep abreast of your security posture by navigating to your settings with ease:
G, S: Navigate to your security settings.
With these keyboard shortcuts under your belt, you’ll become a GitHub power user in no time. And remember, you don’t have to commit all of these to memory—the GitHub Command Palette has all that covered for you.
Want to know what other GitHub users’ favorite keyboard shortcuts are? Take a look through the comments on this video. And to further boost your productivity on GitHub, you can explore GitHub Actions—an integrated automation and CI/CD service within your repositories. GitHub Actions streamlines code-related tasks and development by defining event-triggered workflows; check it out today! Get started with GitHub Actions.
Tags:
Written by
Related posts
Boost your CLI skills with GitHub Copilot
Want to know how to take your terminal skills to the next level? Whether you’re starting out, or looking for more advanced commands, GitHub Copilot can help us explain and suggest the commands we are looking for.
Beginner’s guide to GitHub: Setting up and securing your profile
As part of the GitHub for Beginners guide, learn how to improve the security of your profile and create a profile README. This will let you give your GitHub account a little more personality.
Beginner’s guide to GitHub: Merging a pull request
As part of the GitHub for Beginners guide, learn how to merge pull requests. This will enable you to resolve conflicts when they arise.