GitHub has thousands of such "features" and they're all "hidden" in plain sight in big green buttons. None of this is undocumented, they all appear exactly where you would expect them (e.g. when searching as a new user, GitHub suggests you can use regex)
Here's an undocumented (actually hard to find) feature:
- on a commit or PR, append .patch or .diff to the URL
Hold option and click on the “collapse file” button in the Files view of a commit or pull request, and it will collapse all the files.
Select text in a comment, issue, or pull request description and press r—the selected text (including markdown formatting) will get pre-populated as a markdown block quote reply in the next comment box.
Add .patch or .diff to any pull request URL if you want to see a plain-text diff of the pull request (e.g. maybe you want to quickly `curl ... | git apply -` an unmerged pull request into a local copy of the repo without trying to add and fetch the git remote that the pull request is from).
There are lots of keyboard shortcuts. For example, / to jump to the file finder.
Not so much a secret but more like a hiding in plain sight: when looking at a commit GitHub will show you the earliest and latest tag (i.e. release) that includes the commit. For example, this commit[1] first appeared in v3_2_0_preview3.
> "undocumented" features except they are documented, in the official documentation, it's just that nobody reads documentation anymore.
Then there is no reason for the clickbait title, it's in poor form. Assuming an inability to read does not make it undocumented, not by any definition.
Suggestion, a better title would be "lesser known" features of GitHub.
Thank you! Comments can make it impossible to read the diff. And considering that by default anyone can post comments anywhere, this can be a serious issue. The other tips weren't that useful for me, but this one is a true gem (and is fairly well hidden -- no UI and hard to find in the docs; however when I pressed "?" it was listed in the keyboard shortcuts, which is actually how I discovered "?").
7 comments
[ 10.1 ms ] story [ 102 ms ] thread>USERNAME is a special repository: its README.md will appear on your profile!
then you get a template with some emoji and a nice way to spruce up your profile page.
This is documented here: https://docs.github.com/en/account-and-profile/setting-up-an...
But as OP says, nobody reads the docs. Including me!
Here's an undocumented (actually hard to find) feature:
- on a commit or PR, append .patch or .diff to the URL
https://github.com/sshine.keys
Select text in a comment, issue, or pull request description and press r—the selected text (including markdown formatting) will get pre-populated as a markdown block quote reply in the next comment box.
Add .patch or .diff to any pull request URL if you want to see a plain-text diff of the pull request (e.g. maybe you want to quickly `curl ... | git apply -` an unmerged pull request into a local copy of the repo without trying to add and fetch the git remote that the pull request is from).
There are lots of keyboard shortcuts. For example, / to jump to the file finder.
Not so much a secret but more like a hiding in plain sight: when looking at a commit GitHub will show you the earliest and latest tag (i.e. release) that includes the commit. For example, this commit[1] first appeared in v3_2_0_preview3.
[1]: https://github.com/ruby/ruby/commit/892f350a7db4d2cc99c5061d...
Then there is no reason for the clickbait title, it's in poor form. Assuming an inability to read does not make it undocumented, not by any definition.
Suggestion, a better title would be "lesser known" features of GitHub.
> Press I in a PR to hide comments.
Thank you! Comments can make it impossible to read the diff. And considering that by default anyone can post comments anywhere, this can be a serious issue. The other tips weren't that useful for me, but this one is a true gem (and is fairly well hidden -- no UI and hard to find in the docs; however when I pressed "?" it was listed in the keyboard shortcuts, which is actually how I discovered "?").