GitHub Secrets
Over the years we’ve added quite a bit of stuff to GitHub. Sometimes we ship huge features, sometimes we ship small, lesser-known bonus features. Let’s talk about some of those…
Over the years we’ve added quite a bit of stuff to GitHub. Sometimes we ship huge features, sometimes we ship small, lesser-known bonus features.
Let’s talk about some of those secret features you may not know about.
Whitespace
Ever have someone push a commit that involves a lot of real changes mixed in with a bunch of less-meaningful whitespace? Add ?w=1 to the URL to see the diff with whitespace ignored.
Cross-Repository Issue References
Sure, GitHub’s all about social coding, but you can have social repositories, too. You can reference issues between repositories by mentioning user/repository#number in an issue. Once we see something like that — say, github/enterprise#59 — we’ll make sure to update issue #59 in github’s enterprise repository and let you know where it was referenced from. This is a part of GitHub Flavored Markdown, which also has a few tricks of its own.
Hot Branch on Branch Pull Request Action
Pull Requests are awesome. They make it really easy to merge code between forks. But did you know you can use Pull Requests between branches, on the same repository? You don’t need to fork repositories to use Pull Requests. Internally at GitHub, we almost always use Pull Requests between branches.
.diff, .patch
Part of the power Git had from the start was the ability to generate quick diff and patch files for use with email lists and quick one-off text exchanges. GitHub’s no different. Just add .diff or .patch at the end of the URL for a commit page, Pull Request, or Compare View and we’ll show you the plaintext view of that page.
w & t
Navigate your project quickly. On your repository’s home page, type w to quickly bring up a quick filter panel for your branches. Inside of your repository, type t to jump into a quick file selector. Select your file, hit enter, and you’re gold. There’s also a slew of other shortcut keys you can use, depending on the page- just hit ? to see them.
Filter Notifications by Repository or User
Email notifications for Issues, Pull Requests, and Gists can easily be filtered by the List-ID
header. Look for this header value to sort your notifications, or even forward them to a more appropriate email account. You can filter on *.org.github.com to filter out emails by organization, or repo.org.github.com to filter out emails from a specific repo.
Subscribe to Threads
Now that you’ve got your mail filtering notifications, did you know you can let us know which threads to keep you notified on? On the bottom of the page, you can scroll down and click Enable notifications and we’ll send you a notification when it’s been updated. This works for issues, commit notes, pull requests… you name it. Too much email? You can disable it just as easily.
Written by
Related posts
Apply now for GitHub Universe 2023 micro-mentoring
As part of our ongoing commitment to accelerate human progress through Social Impact initiatives, we’re offering students 30-minute, 1:1 micro-mentoring sessions with GitHub employees ahead of Universe.
The 2023 Open Source Program Office (OSPO) Survey is live!
Help quantify the state of enterprise open source by taking the 2023 OSPO survey.
Godot 4.0 Release Party 🎉
We are delighted to host the Godot 4.0 Release Party at GitHub HQ on Wednesday, March 22 from 6:30 pm to 9:30 pm. And you’re invited!