GitHub has too many hidden features
Discover undocumented features of GitHub: open repos in online VSCode, add experimental features, regex code search, and more!
-
If you're on a repo main page and press
.
then you open it up in "github.dev": an online VSCode instance where you can make edits to code, push commits, and review pull requests inline. -
If you click on your profile picture in the upper right corner of the screen, you get an option for "feature preview", which lets you add experimental features to your github. For example, you can enable rich Jupyter diffs and make
ctrl+alt+k
open a command palette. - You can regex search code, both in a repo and sitewide, by wrapping the search in
/slashes/
./^hash.?map/
matches "hashmap", "hash_map", and "hash map", but only as the first word of a line. You can also search ranges in metadata, like projects with at least 20 stars. - Press
Y
in a repo to change the URL from branch-based to canonical commit-based. PressI
in a PR to hide comments. PressA
to hide the "build failed" annotations (h/t Martin Janiczek). - I mentioned github.dev, right? Did I mention that you can use it on other people's repos, it'll save your work across browser sessions, and it'll only fork the repo if you try to commit?
-
If you're commenting on a PR and put a backtick-codeblock labelled suggestion in the comment, it'll show it as a line change:
-
There's an online graphql IDE so you can do graphql queries without having to set anything up locally. I haven't used it yet but I think it'll be a really handy research tool!
I'd call these all "undocumented" features except they are documented, in the official documentation, it's just that nobody reads documentation anymore. GitHub's been trying to integrate some of these features into the UI but nobody presses random buttons on UIs either. I've not been able to find any "GitHub tips and tricks" resources; if there is one, it's camouflaged by all the pages for git tips.1
So instead I'm getting the word out with an email blast. Seriously try the .
thing it's super duper useful
-
It's interesting to me that while GitHub is almost as universal as git is, but there's lots of stuff on how to use git well and nothing on how to use GitHub well. ↩
If you're reading this on the web, you can subscribe here. Updates are once a week. My main website is here.
My new book, Logic for Programmers, is now in early access! Get it here.