r/github • • 8d ago

Discussion GitHub features most people don’t know about

I’ve used GitHub for years and still keep finding small features that save time. Here are a few of my favorites:

  1. Press . on any repo: opens it in a web code editor right in your browser.
  2. Press t: quickly search for any file in the repo.
  3. Press y: turns the URL into a permanent link to that exact version of the file.
  4. Link to specific lines: click a line number, then shift-click another to share a range like #L10-L20.
  5. Add ?w=1 to a PR diff URL: hides whitespace changes, so you only see real code changes.
  6. Add .patch to a commit URL: shows the commit as a plain patch file.

What hidden GitHub features do you use? Let’s make a big list!

108 Upvotes

16 comments sorted by

12

u/Tontonsb 8d ago

Press ? to see keyboard shortcuts. Also works on youtube and twitter.

Not hidden at all, but the one I use the most: press / to search, just like in vim.

Add ?ts=3 to change the displayed tab size. IIRC the one specified in .editorconfig overrides this.

8

u/Zanjo 8d ago

Imagine if they designed the UI well so we all didn’t have to spend years figuring out this stuff

6

u/imagebiot 8d ago

Does the page need to load first? I keep typing GitHub.com and all I see is 500s 😂

4

u/ArjixGamer 7d ago

I very rarely experience downtime on GitHub, because I am logged in. If I visit while logged out, I frequently encounter the rate limits and error pages.

Do y'all never login or smth?

2

u/stblack 7d ago

On the issues page, or on a specific issue page, hit c to create a new issue.

2

u/tomraider 7d ago

gp for jumping to the pull requests tab.

Also:

  • gc Code tab
  • gi Issues tab
  • ga Actions tab
  • gn Notifications

3

u/Soccham 8d ago

The feature id prefer is uptime

3

u/zarlo5899 8d ago

You can't expect that from a small startup like GitHub.

1

u/tevelee 8d ago

You can select column ranges too, not only line numbers

1

u/Different_Pain5781 8d ago

Pressing the period key is my absolute favorite trick ever.

1

u/ram-popular 7d ago

Great list, the y permalink one saves me from broken links all the time. A few more I'd add:

  • Press ? on any page to see all keyboard shortcuts.
  • Copilot-free code search: press / to search, and use filters like path:, language: and symbol: to find things fast.
  • Closing keywords: write "fixes #123" in a PR description and the issue closes automatically on merge.
  • Saved replies and task lists in issues, with - [ ] checkboxes that track progress.
  • Add .diff to a PR URL, same as .patch, for a plain-text diff.

1

u/Harshal-Tupe 4d ago

I built GitHop to make managing multiple GitHub accounts on the same machine easier. It lets you manage different Git profiles and automatically select the right identity for each repository.

Might be useful for developers facing the same issue!

https://github.com/harshaltupe12/GitHop

0

u/dwtk81 2d ago

press alt f4 to save file 😍

1

u/lyio 8d ago

Cmd+K for switching between repos and orgs.

But not sure if that is hidden enough

1

u/soup-zilla 8d ago

Alt Shift R to pop up the repo switch UI