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
The top 10 gifts for the developer in your life
Whether you’re hunting for the perfect gift for your significant other, the colleague you drew in the office gift exchange, or maybe (just maybe) even for yourself, we’ve got you covered with our top 10 gifts that any developer would love.
Congratulations to the winners of the 2024 Gaady Awards
The Gaady Awards are like the Emmy Awards for the field of digital accessibility. And, just like the Emmys, the Gaadys are a reason to celebrate! On November 21, GitHub was honored to roll out the red carpet for the accessibility community at our San Francisco headquarters.
Students: Start building your skills with the GitHub Foundations certification
The GitHub Foundations Certification exam fee is now waived for all students verified through GitHub Education.