If you’re getting into open-source and using GitHub most of the time then you should learn more about all the keyboard shortcuts available on github. Few of them you can see by hitting Shift + ?
Please have a look at the below snapshots which show few shortcuts.
Finding Files over Github Projects
You can find files on github in just a few seconds.
Press t and type your file name which you want to search. On hitting t, it will Activate file finder which help to find any file within the github-repository.
Line Highlighting, Copy Lines & Copy Permalink
This is one of the best things if you are working with a large team or working as an open-source contributor. Line highlighting will help you to highlight a piece of code and can share it with your team or can use for creating issue/pull requests.
For highlighting the lines, first, click on the line number from where you need to start then
Press Shift and select the line number where you want to ends.
After Highlighting, On Clicking three dots menu, you can see 4 options
[Copy Lines, Copy permalink, View git blame, Reference in new issue]
Copy Line: This will helps you to copy & share over the sharing platform.
Copy permalink: This will helps you to share highlighted code through the links & this link can also be used in creating new issue/creating the pull request.
Browse files and directories with ease
You can browse files & directories using Octotree Chrome extensions. Using these extensions, you can easily navigate to directories, and open files with the same structure you have in local machine. This extension is available for another browser also Octotree
Opening Github repository in VS code
This is the most interesting thing for the developers who are using Visual Studio Code. This trick will help you to browse files & directories from the remote itself. If you are getting into open-source then this will help you to read code over github no need to clone and check into your local machine.
For using this trick, you need to add
1s into your domain of github repository.
Ex: Suppose, I have the repository https://github.com/amankumar367/Android-ExoPlayer in this link you just need to add
github -> github1s and the final link will be https://github1s.com/amankumar367/Android-ExoPlayer
Note: This will work for the repository only.
I hope you liked this article. If you find this article helpful then share it with everyone. Maybe it’ll help someone who needs it 😃.