⌥+⌃AltPlusCtrl

March 6, 2026 · 9 min read · By AltPlusCtrl Team

GitHub Keyboard Shortcuts and Git CLI Aliases Worth Setting Up

GitHub.com has a surprisingly deep keyboard shortcut set most developers never discover, and a handful of git aliases save more typing than any single shortcut on this site.

GitHub.com — the website, not the git command line tool itself — has one of the more surprisingly deep keyboard shortcut sets of any web application, and almost nobody uses more than a small fraction of it. Separately, git itself doesn't have 'shortcuts' in the traditional sense, but its alias system functions the same way, letting you compress long, frequently-typed commands into two or three characters. Both are worth setting up deliberately rather than discovering by accident.

GitHub.com: the shortcut most developers never find

Pressing ? on almost any GitHub.com page opens a full shortcut cheat sheet specific to that page's context — genuinely one of the best-designed in-app shortcut references on the web, since it shows you exactly what's available right where you are rather than a generic, disconnected help page. Pressing T on a repository page opens the file finder — a fuzzy-search jump to any file in the repo by typing part of its path, dramatically faster than clicking through the folder tree for anything beyond a shallow repository structure.

Navigating pull requests and issues by keyboard

Within a pull request or issue list, J and K move the selection down and up — the same convention found across a lot of other keyboard-driven web software (Gmail's message list uses the identical pattern), and genuinely useful for triaging a long list of open PRs or issues without a mouse. G then P jumps to the Pull Requests tab, G then I jumps to Issues, and G then C jumps to Code — this 'G then a second letter' pattern (called a chord in shortcut terminology) is used throughout GitHub for jumping between major sections, and it's worth learning as a system rather than memorizing each combination independently, since the logic (G, then the first letter of where you want to go) generalizes reasonably well once you've internalized a few examples.

Reviewing code faster

Within a pull request's Files Changed tab, N and P jump to the next and previous file in the diff — considerably faster than scrolling through a large multi-file diff manually, especially for reviews touching dozens of files where visual scrolling risks missing a file entirely. C toggles a comment on the currently focused line — useful for leaving inline review feedback without reaching for the mouse to click the exact line's plus icon, which can be fiddly on a dense diff.

Repository-wide search and quick actions

Pressing S or / from anywhere on GitHub jumps focus to the global search bar, and typing a repository owner and name directly (or using search qualifiers like `repo:`, `is:pr`, or `author:`) turns it into a genuinely fast way to jump to a specific repository or filtered result set without navigating there by clicking through an organization's repository list. Ctrl+K (Cmd+K) opens GitHub's own command palette on newer interface versions, following the same fuzzy-search-everything pattern found in most of the other developer tools covered on this site — worth learning as the fallback for any action you don't have a dedicated shortcut memorized for.

Git aliases: the command-line equivalent of a shortcut

Git doesn't have keyboard shortcuts in the traditional GUI sense, but its alias system accomplishes the same underlying goal: reducing a long, frequently repeated action to a short trigger. Setting these up takes a few minutes with `git config --global alias.<name> '<command>'` and pays for itself within the first day of use for anyone committing regularly. A few worth setting up immediately: `git config --global alias.co checkout`, `git config --global alias.br branch`, `git config --global alias.st status`, and `git config --global alias.cm 'commit -m'` — turning `git checkout main` into `git co main` and `git commit -m "message"` into `git cm "message"`, both meaningful reductions in typing for two of the most frequently run git commands of any development workflow.

A slightly more advanced but genuinely valuable one: `git config --global alias.lg "log --graph --oneline --decorate --all"` — turning a long, hard-to-remember flag combination into a two-letter command that gives a readable, branch-visualizing commit history any time you need to understand how a repository's branches relate to each other, without needing to reach for a GUI git client just to see that structure.

A few more aliases worth the two minutes to set up

`git config --global alias.unstage 'reset HEAD --'` gives a clear, memorable command for the surprisingly common need to un-stage a file without discarding its changes — the raw git command for this is neither short nor obvious. `git config --global alias.last 'log -1 HEAD'` shows the details of your most recent commit instantly, useful for a quick sanity check right after committing before pushing. `git config --global alias.amend 'commit --amend --no-edit'` is worth having specifically because typing the full flag combination correctly from memory, under the mild time pressure of fixing a just-made mistake, is exactly the situation shortcuts and aliases are built for.

If you use a GUI git client instead of the raw CLI

GitHub Desktop, GitKraken, and SourceTree each have their own dedicated keyboard shortcut sets for staging, committing, and branch switching, worth learning as their own systems rather than assuming a git-CLI-alias mindset transfers directly, since these tools are built around visual, click-driven interaction with keyboard shortcuts layered on top rather than the CLI's text-first, alias-friendly design. That said, the underlying speed philosophy is the same: identify the actions you perform most often (staging changes, switching branches, committing) and make sure you have the fastest possible path to each, whether that's a CLI alias or a memorized keyboard shortcut in your GUI tool of choice.

GitLab and Bitbucket as alternatives

If your team uses GitLab instead of GitHub, its web interface follows a broadly similar keyboard shortcut philosophy — the same '?' to reveal contextual shortcuts, and a comparable J/K navigation pattern in merge request and issue lists — worth checking directly since the exact key combinations for jumping between sections differ from GitHub's in several places despite the overall design philosophy being closely aligned. Bitbucket, Atlassian's own git hosting product, has a smaller but comparable shortcut set, particularly useful to know if your team already uses Jira and Bitbucket together as part of the wider Atlassian ecosystem.

Where this fits into a broader terminal workflow

Git aliases are a natural complement to general terminal fluency — see the terminal power-user post for the shell-level shortcuts (history search, line editing) that pair with git-specific aliases to make command-line work genuinely fast rather than just less typing-intensive in isolation. And if a meaningful part of your git workflow happens inside your editor rather than a separate terminal or GUI tool, VS Code's built-in source control panel has its own shortcut set worth layering on top of both the web and CLI approaches covered here.

githubgitdeveloper-toolsproductivity