GitHub

Internet hosting service for software development and version control using Git.

Like GitLab it provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, continuous integration, and wikis for every project.

You can optimize working with GitHub by using described tips/shortcuts in the next sections.

GitHub CLI

GitHub CLI brings GitHub to your terminal.

Auth through browser::gh auth login

Site wide shortcuts

  • Show keyboard shortcuts for current page::?
  • Focus the search bar.::s
  • Go to your notifications.::g n
  • Close hovercard and refocus on the element the hovercard is in::esc
  • Opens the GitHub Command Palette.::ctrl + k
  • Opens the GitHub Command Palette while editing Markdown::ctrl + alt + k

Repositories

  • Go to the Code tab::g c
  • Go to the Issues tab.::g i
  • Go to the Pull requests tab.::g p
  • Go to the Projects tab.::g b
  • Go to the Wiki tab.::g w

Source code editing

  • Opens a repository or pull request in the web-based editor.::.
  • Open source code file in the Edit file tab::e
  • Start searching in file editor::ctrl + f
  • Find next::ctrl + g
  • Find previous::ctrl + shift + g
  • Replace::ctrl + shift + f
  • Replace all::ctrl + shift + r
  • Jump to line::alt + g
  • Undo::ctrl + z
  • Redo::ctrl + y
  • Toggles between the Edit file and Preview changes tabs::n/a

Source code browsing

  • Activates the file finder::t
  • Jump to a line in your code::l
  • Switch to a new branch or tag::w
  • Expand a URL to its canonical form.::y
  • Show or hide comments on diffs.::i
  • Open blame view.::b

Comments

  • Inserts Markdown formatting for bolding text::ctrl + b
  • Inserts Markdown formatting for italicizing text::ctrl + i
  • Inserts Markdown formatting for creating a link::ctrl + k
  • Toggles between the Write and Preview comment tabs::ctrl + shift + p
  • Submits a comment::ctrl + enter
  • Open saved replies menu and then autofills comment field with saved reply 1.::ctrl + . ctrl + 1
  • Insert a suggestion.::ctrl + g
  • Quote the selected text in your reply.::r

Issue and pull request lists

  • Create an issue::c
  • Focus your cursor on the issues or pull requests search bar.::ctrl + /
  • Filter by author::u
  • Filter by or edit labels.::l
  • While filtering by labels, exclude labels.::alt
  • Filter by or edit milestones.::m
  • Filter by or edit assignee.::a
  • Open issue::o

Issues and pull requests

  • Request a reviewer.::q
  • Set a milestone.::m
  • Apply a label.::l
  • Set an assignee.::a
  • Toggles between the Write and Preview tabs::ctrl + shift + p

Changes in pull requests

  • Open the list of commits in the pull request (files changed tab)::c
  • Open the list of changed files in the pull request::t
  • Move selection down in the list::j
  • Move selection up in the list::k
  • Add a single comment on a pull request diff::ctrl + shift + enter
  • Toggle between collapsing and expanding all outdated review comments in a pull request.::alt
  • Comment on multiple lines of a pull request::click shift + click

Project boards

  • Start moving the focused column::space
  • Cancel the move in progress::esc
  • Complete the move in progress::enter
  • Move column to the left::left
  • Move column to the leftmost position::ctrl + h
  • Move column to the right::right
  • Move column to the rightmost position::ctrl + l
  • Start moving the focused card::space
  • Cancel the move in progress::esc
  • Complete the move in progress::enter
  • Move card down::down
  • Move card to the bottom of the column::ctrl + j
  • Move card up::up
  • Move card to the top of the column::ctrl + k
  • Move card to the bottom of the column on the left::left
  • Move card to the top of the column on the left::shift + left
  • Move card to the bottom of the leftmost column::ctrl + left
  • Move card to the top of the leftmost column::ctrl + shift + left
  • Move card to the bottom of the column on the right::right

Project boards

  • Move card to the top of the column on the right::shift + right
  • Move card to the bottom of the rightmost column::ctrl + right
  • Move card to the bottom of the rightmost column::ctrl + shift + right

Previewing a card

  • Close the card preview pane::esc

GitHub Actions

  • In the workflow editor, get suggestions for your workflow file.::ctrl + space

Notifications

  • Mark as done::e
  • Mark as unread::shift + u
  • Mark as read::shift + i
  • Unsubscribe::shift + m

Network graph

  • Scroll left::left
  • Scroll right::right
  • Scroll up::up
  • Scroll down::down
  • Scroll all the way left::shift + left
  • Scroll all the way right::shift + right
  • Scroll all the way up::shift + up
  • Scroll all the way down::shift + down

References