GitHub Cheat Sheet: Git and GitHub Tricks in One README
GitHub Cheat Sheet is a single-README collection of Git and GitHub tricks: URL query params like ?w=1 and ?ts=4, keyboard shortcuts, commit-message issue closing, and diff/patch URL suffixes. Reach for it when you want a five-minute skim of tricks to try today. Skip it if you need a structured course — most entries are a paragraph and an outbound link, not a tutorial.
What is the GitHub Cheat Sheet?
GitHub Cheat Sheet is a curated README that showcases both secret and public Git and GitHub features, from diff URL tricks to keyboard shortcuts. Inspired by Zach Holman's 'Git and GitHub Secrets' talks, it organizes each tip as a short explanation with a link to GitHub's own blog or help docs for the full detail.
Key GitHub and Git Features Covered
- ✓Diff URL query params: append ?w=1 to ignore whitespace-only changes or ?ts=4 to render tabs at 4 spaces instead of 8
- ✓Keyboard shortcuts on repo pages: t opens the file finder, w opens the branch selector, s focuses search, y freezes the URL to the current commit
- ✓Commit-message issue automation: fix/close/resolve keywords followed by an issue number auto-close that issue when merged to the default branch
- ✓Search filters for Issues and PRs: is:merged, status:success, and negated label filters like -label:activerecord
- ✓Diff and patch URLs: appending .diff or .patch to a pull request URL returns the raw text diff or patch file
- ✓Gist tricks: appending .pibb to a Gist URL gives an HTML-only embeddable version, and Gists can be git cloned like any repo
- ✓Contribution scaffolding: CONTRIBUTING, ISSUE_TEMPLATE, and PULL_REQUEST_TEMPLATE files GitHub auto-detects from the repo root or a .github directory
- ✓Hub, a command-line Git wrapper covered as a companion tool for GitHub-specific commands like hub clone
How to Use These GitHub Tips
- •Add ?w=1 to a GitHub diff URL when reviewing a PR to strip out whitespace-only noise
- •Type is:merged or status:success into the Issues/PRs search bar to filter a busy repo down to what actually shipped
- •Write 'fixes #12' in a commit message so merging it closes the linked issue automatically
- •Drop a CONTRIBUTING.md and PULL_REQUEST_TEMPLATE into .github/ so new contributors see guidance the moment they open a PR
- •Press ? on any repo page to see the full keyboard shortcut list for that page
Who Benefits from This Cheat Sheet?
Developers who already use GitHub daily but have never dug into its query-string tricks or keyboard shortcuts get the most out of GitHub Cheat Sheet. It suits someone skimming for one useful habit to adopt this week, not a beginner who needs Git explained from init to push — the README assumes you already know what a commit, branch, and pull request are.
Strengths
- ✓Every tip links out to GitHub's own blog post or help doc for the full explanation, so you're not trusting a paraphrase
- ✓Entries are short — most are a paragraph plus a code block or URL pattern, so you can skim the whole thing in one sitting
- ✓Covers real day-to-day mechanics (diff URLs, search filters, commit-message automation) instead of generic Git advice you'd find in any tutorial
- ✓Available in Korean, Japanese, Simplified Chinese, and Traditional Chinese translations alongside the English original
What the Cheat Sheet Doesn't Cover
- △No search or filtering inside the README itself — finding one specific trick means scrolling or using browser find
- △Several entries reference GitHub UI details and blog posts from years ago, so a few links or described buttons may no longer match the current interface
- △It's a flat list, not a course. There's no path from beginner to advanced, just parallel entries covering GitHub features and Git basics side by side
- △Nothing here explains core Git concepts like branching or merge conflicts — it assumes you already know Git before you open the README
Other Resources for GitHub Learning
Common Questions
GitHub Cheat Sheet covers browser URL tricks (diff whitespace and tab-width params), keyboard shortcuts, commit-message issue automation, search filters for Issues and PRs, Gist tricks, diff/patch URL suffixes, and contribution-file scaffolding like CONTRIBUTING and issue templates.
GitHub Cheat Sheet is available in Korean, Japanese, Simplified Chinese, and Traditional Chinese translations in addition to the original English README.
GitHub Cheat Sheet is released under the MIT license, a permissive license that lets you use, copy, and adapt its content freely, including in commercial projects.
GitHub Cheat Sheet targets developers who already use GitHub regularly and want to pick up shortcuts and URL tricks they haven't stumbled on yet — it isn't written for someone still learning what Git is.
GitHub Cheat Sheet is mostly about GitHub's web interface and URL tricks, though it does cover a few command-line items like cloning without the .git suffix, closing issues through commit messages, and the Hub command-line wrapper.
Related repositories
Still deciding about github-cheat-sheet?
One click hands the question to an AI along with this page — see what it says about github-cheat-sheet.
