DEV Community

Cover image for Github shortcuts that will make sure that you don't have to use your mouse while browsing
Shubhra Agarwal
Shubhra Agarwal

Posted on

Github shortcuts that will make sure that you don't have to use your mouse while browsing

You must've heard that pressing the "." key in any Github repository will open it in an online code editor.

But here are a few more shortcuts which will ensure that you don't have to touch the mouse again when using Github

Intro image

TL;DR

  1. Sitewide shortcuts
  2. Go to shortcuts
  3. Editing code shortcuts
  4. Browsing the code shortcuts
  5. Notifications
  6. Make Changes in a pull request

Getting started with keyboard shortcuts

Before I bore you out with all shortcuts or make you remember all of them, you just have to press the "?" key or "Shift + /" and you will see a dialog box which has all the shortcuts that work on github.
image

Site wide shortcuts

  • s or / will focus the search bar

  • j and k will move selection up and down respectively

  • x to toggle selection

  • o or enter to open selection

  • esc to close selection

Go to Shortcuts

  • g + c -> Go to code

  • g + i -> Go to issues

  • g + p -> Go to PR

  • g + b -> Go to Projects

  • g + d -> Go to Homepage of current account

  • g + n -> Go to your notifications

Editing the source code

  • ctrl + b/i -> Markdown formatting for bolding/italicizing text

  • ctrl + k -> Markdown formatting for creating link

  • e -> Edit source code

  • alt + g -> Jump to line

  • ctrl + shift + p -> Toggle between edit file and preview file

Browsing the source code

  • t -> Activates the file finder

  • w -> Switch to a new branch or tag

  • y -> Expand a URL to its canonical form.

  • i -> Show or hide comments

  • a -> Show or hide annotations

  • b -> Open blame view.

Notifications

  • e -> Mark as done

  • shift + u -> Mark as unread

  • shift + i -> Mark as read

  • shift + m -> Unsubscribe

Make changes in pull request

  • c -> Open list of commits

  • t -> Open the list of changed files

  • j/k -> Move selection down/up in the list

That was it for this post. If you liked it don't forget to

  • Hit the ๐Ÿงก button

  • Follow @shubhracodes for more such informative posts

Top comments (0)