Keyboard shortcuts for Github that you probably didn't know existed

Keyboard shortcuts for Github that you probably didn't know existed

When developers are creating something, they are making constant changes to the code and releasing new versions, up to and after the first official release. One of the preferred platforms to do it is Github. GitHub is now the largest online storage space of collaborative works that exists in the world.

As a developer probably you know Github and you use it everyday, however did you know that there are some useful keyboard shortcuts available in the webapp ? After almost 1 year using it everyday I discovered that today and I feel myself someway ashamed. However I hope that i'm not the only one that didn't know that and therefore in this article you will know the most useful keyboard shortcuts for Github.

1. Shorcuts available in the entire website

The following shortcuts are available in the entire website, that means that as long as you are in the main domain they'll be accesible.

S

If you press the S button, the search bar will be automatically focused (and will search in the repo or in the entire Github according to wherever you are).

Github search bar

G + N

If you press the G button and immediately the K button on your keyboard, you will be redirected to the notification center of Github.

Notifications Center Github

G + D

If you press the G button and D from any page of the website you will be redirected to the homepage of Github.

2. Shortcuts available in the repository

As long you're located in a repository (yours or from any user https://github.com/<user-or-org>/<repo-name>) you can execute the following shortcuts that allow you to navigate between action tabs:

G + C

If you press the G button and immediately the C button, you will be redirected to the code tab of the repository.

G + I

If you press the G button and immediately the I button, you will be redirected to the issues area of the repository.

G + P

If you press the G button and immediately the P button, you will be redirected to the pull requests tab of the repository.

G + W

If you press the G button and immediately the W button, you will be redirected to the Wiki tab of the repository.

Github Action Tabs of repository

3. Shortcuts available in the source code tab or code browser

The following shortcuts are available while you're in the code tab or viewing a single file from the source code of the repository.

T

If you press the T key, you will open the file finder that allows you to search a file by its name in the source code of the repository.

L

If you press the L key, you will open the go to line menu.

Jump to line menu github

W

If you press the W key, the dropdown menu that allows you to navigate between branches and tags will be shown.

Branch and Tags dropdown menu

Y

If you press the Y key, you will be redirected to the canonical version of the URL e.g the url https://github.com/sdkcarlos/artyom.js/blob/master/bower.json would be now https://github.com/sdkcarlos/artyom.js/blob/7a1240e3d0ba22227722ca0eb0e585841254706d/bower.json

I

If you press I during the view of a diff, the comments will be shown/hidden.

B

If you press the B key while you see a file, the view blame will be enabled.

Blame View code Github

4. Issues and pull request lists

C

While you are located in the issues area, press the C key to create a new Issue.

/

Press the the / key (slash) to focus the search bar of the issues (not the Github search bar).

U

Press the U key to open the filter issues by username menu.

Filter issues by name Github

L

Press the L key to open the filter by labels menu.

Filter by Label Github issues

M

Press the M key to open the filter issues by milestone menu.

Milestone Filter Menu Github

A

Press the A key to open the filter issues by assigned.

Filter by assigned

R

If you press the R key after the selection of some text from the issue, it will be quoted in your reply to that issue.

Reply Github Shortcut

And these are just a couple of all the shortcuts available for the web version, feel free to read more about here.

If you discovered today with this article that there are keyboard shortcuts in Github, please share this article with another developer that uses Github.

Become a more social person