Github HotKey Cheatsheet

GitHub is a widely used platform for version control and collaboration. Using keyboard shortcuts can significantly improve your efficiency on the platform.

GitHub Windows Shortcut Keys

Site wide shortcuts

ShortcutAction
SFocus the search bar
GNGo to your notifications
HOpens and focuses on a user, issue, or pull request hovercard
EscWhen focused on above, closes hovercard

Repositories

ShortcutAction
GCGo to the Code tab
GIGo to the Issues tab
GPGo to the Pull requests tab
GBGo to the Projects tab
GWGo to the Wiki tab

Source code editing

ShortcutAction
CtrlFStart searching in file editor
CtrlGFind next
CtrlShiftGFind previous
CtrlShiftFReplace
CtrlShiftRReplace all
AltGJump to line
CtrlZUndo
CtrlYRedo

Source code browsing

ShortcutAction
TActivates the file finder
LJump to a line in your code
WSwitch to a new branch or tag
YExpand a URL to its canonical form
IShow or hide comments on diffs
BOpen blame view

Comments

ShortcutAction
CtrlBInserts Markdown formatting for bolding text
CtrlIInserts Markdown formatting for italicizing text
CtrlKInserts Markdown formatting for creating a link
CtrlShiftPToggles between the Write and Preview comment tabs
CtrlEnterSubmits a comment
Ctrl.Opens saved replies menu and then autofills comment field with a saved reply
CtrlGInserts a suggestions
RQuote the selected text in your reply

Issue and pull request lists

ShortcutAction
CCreate an issue
Ctrl/Focus your cursor on the issues or pull requests search bar
UFilter by author
LFilter by or edit labels
MFilter by or edit milestones
AFilter by or edit assignee
OOpen issue

Issues and pull requests

ShortcutAction
QRequest a reviewer
MSet a milestone
LApply a label
ASet an assignee

Changes in pull requests

ShortcutAction
COpen the list of commits in the pull request
TOpen the list of changed files in the pull request
JMove selection down in the list
KMove selection up in the list
CtrlShiftEnterAdd a single comment on a pull request diff
Alt(click)Toggle between collapsing and expanding all outdated review comments in a pull request

Project boards

ShortcutAction
Enter/SpaceStart moving the focused column
EscCancel the move in progress
EnterComplete the move in progress
Left/HMove column to the left
CtrlLeft/HMove column to the leftmost position
Right/LMove column to the right
CtrlRight/LMove column to the rightmost position
Enter/SpaceStart moving the focused card
EscCancel the move in progress
EnterComplete the move in progress
Down/JMove card down
CtrlDown/JMove card to the bottom of the column
Up/KMove card up
CtrlUp/KMove card to the top of the column
Left/HMove card to the bottom of the column on the left
ShiftLeft/HMove card to the top of the column on the left
CtrlLeft/HMove card to the bottom of the leftmost column
CtrlShiftLeft/HMove card to the top of the leftmost column
RightMove card to the bottom of the column on the right
ShiftRight/LMove card to the top of the column on the right
CtrlRight/LMove card to the bottom of the rightmost column
CtrlShiftRight/LMove card to the top of the rightmost column

Notifications

ShortcutAction
E/L/YMark as read
ShiftMMute thread

Network graph

ShortcutAction
Left/HScroll left
Right/LScroll right
Up/KScroll up
Down/JScroll down
ShiftLeft/HScroll all the way left
ShiftRight/LScroll all the way right
ShiftUp/KScroll all the way up
ShiftDown/JScroll all the way down

Download GitHub Windows Shortcut Keys Cheatsheet PDF

We provide a GitHub Windows Shortcut Keys PDF download feature. Click the download button to get the file. Please note that generating the PDF may take some time, so please be patient. Download

GitHub macOS Shortcut Keys

Global Navigation

ShortcutDescription
sFocus on the search bar
g nGo to notifications
g dGo to the dashboard

Repository Browsing

ShortcutDescription
g cShow code tab
g iShow issues tab
tSearch for a file by name (within a repository's code page)
lGo to a specific line number (when viewing a source code file)
. (period)Open the repository or pull request in the github.dev editor in the same browser tab (requires login)
> (greater than)Open the repository or pull request in the github.dev editor in a new browser tab (requires login)

Issues and Pull Requests Lists

ShortcutDescription
cCreate a new issue
Command + /Focus on the issue or pull request search bar
uFilter by author
lFilter by label or edit labels
Option + ClickExclude a label when filtering
mFilter by milestone or edit milestones
aFilter by assignee or edit assignees
o or EnterActivate an issue

Issues and Pull Requests (Detailed)

ShortcutDescription
qRequest reviewers
mSet a milestone
lApply labels
aSet assignees
xLink issues or pull requests from the same repository
Command + Shift + pToggle between the "Write" and "Preview" tabs
Option + ClickWhen creating an issue from a task list, open the new issue form in the current tab
Shift + ClickWhen creating an issue from a task list, open the new issue form in a new tab
Command + ClickWhen creating an issue from a task list, open the new issue form in a new window
Option + Shift + cCreate a new sub-issue
Option + Shift + aAdd an existing issue as a sub-issue
Option + Shift + pEdit the parent issue
Command + bInsert Markdown for bold text
Command + iInsert Markdown for italic text
Command + kInsert Markdown for creating a link
Command + Shift + 7Insert Markdown for an ordered list
Command + Shift + 8Insert Markdown for an unordered list
Command + Shift + .Insert Markdown for a blockquote

Code File Navigation and Editing

ShortcutDescription
Shift + jHighlight the currently selected line(s) in a code file.
Shift + Option + cIf a code line is currently selected, this shortcut opens the line menu for that line.
Command + EnterHighlights the code symbol currently selected by the cursor and all other occurrences of the symbol in the code, and shows the symbol in the Symbols pane.
eOpen a source code file in the "Edit file" tab.
Command + fStart a search in the file editor
Command + gFind next
Command + Shift + gFind previous
Command + Option + fReplace
Command + Shift + Option + fReplace all
Alt + gGo to line
Command + zUndo
Command + yRedo
Command + sWrite a commit message

Changes in Pull Requests

ShortcutDescription
cOpen the list of commits in a pull request
tOpen the list of changed files in a pull request
jMove the selection down in the lists
kMove the selection up in the lists
Command + Shift + EnterAdd a comment on a pull request diff
Option + ClickToggle between collapsing and expanding all outdated review comments in a pull request by pressing Option and clicking Show outdated or Hide outdated.
Click, then Shift + ClickComment on multiple lines of a pull request by clicking a line number, holding Shift, and then clicking another line number.

Download GitHub MacOS Shortcut Keys Cheatsheet PDF

We provide a GitHub macOS Shortcut Keys PDF download feature. Click the download button to get the file. Please note that generating the PDF may take some time, so please be patient. Download

About GitHub

GitHub is a web-based platform that provides hosting for software development and version control using Git. It offers distributed version control and source code management (SCM) functionality of Git, plus its own features.

GitHub Official Information

GitHub Shortcut Keys FAQs

  1. Are these shortcuts available on all GitHub pages?
    No, some shortcuts are specific to certain pages like repository code pages or issue/pull request pages.

  2. Do these shortcuts work in GitHub Desktop?
    GitHub Desktop has its own set of shortcuts. Please refer to the official documentation for GitHub Desktop shortcuts.

  3. Can I customize these shortcuts?
    No, GitHub does not currently offer a way to customize keyboard shortcuts.

  4. Where can I find the most up-to-date list of shortcuts?
    The official GitHub documentation is the best source for the most current information.

  5. Do these shortcuts work in all browsers?
    Yes, these shortcuts should generally work in all modern browsers.

  6. Are there shortcuts for commenting on code?
    While there aren't dedicated shortcuts for commenting in the same way IDEs provide, using the "reply" function on comments or using the "edit" function on your own comments can be expedited with standard browser shortcuts like Ctrl+Enter (or Command+Enter on macOS) to submit.

  7. What if a shortcut isn't working?
    Double-check that you are on the correct page where the shortcut is applicable. Also, ensure there are no browser extensions or other software interfering with the shortcuts.

Conclusion

By mastering these GitHub shortcut keys, you can significantly enhance your workflow and become more productive on the platform. Remember to refer to the official documentation for the latest information and more specific shortcuts.

5/5 - (1 vote)