github-cheat-sheet
A list of cool features of Git and GitHub.
GitHub Cheat Sheet: shortcuts and URL tricks worth keeping
A collection of hidden and less hidden Git and GitHub features, one that traces back to Zach Holman's conference talks on GitHub secrets in 2012 and 2013.
Where the cheat sheet came from
The README credits its origin to two talks: Zach Holman's Git and GitHub Secrets at Aloha Ruby Conference 2012 and More Git and GitHub Secrets at WDCNZ 2013. The repository grew out of those talks into a broad list of things people tend to discover late. The project carries an MIT license, and it sits with over 58,000 stars.
URL tricks for diffs and files
A few URL parameters do real work. Adding w=1 to a diff URL hides changes that are only whitespace, leaving just the code that actually changed. Adding ts=4 to a diff or file URL renders tabs as four spaces instead of the default eight, and the number is adjustable. The README notes the tab trick does not work on Gists or raw file views.
Gists and keyboard shortcuts
Gists are pitched as an easy way to work with small bits of code without spinning up a full repository. Appending pibb to a Gist URL returns an HTML only version that embeds anywhere, though Gists do not support directories and all files sit at the root. On the shortcut side, t opens a file explorer, w opens the branch selector, s focuses search, l edits labels on issues, and y freezes a file URL against later changes.
The rest of the list
Beyond those, the cheat sheet covers line highlighting with something like L52 or L53-L60, closing issues from commit messages with fix, close, or resolve keywords, and cross linking issues between repositories. There are also sections for locking conversations, filtering issues, rendering tabular CSV and TSV data, and grabbing a pull request's diff or patch by appending the right extension.
Editorial conclusion
What makes the file useful is that most of these features are easy to look up but hard to know about. The shortcut and URL sections alone repay a skim, and the commit message tricks are the kind of thing that saves a few minutes every week once they stick.
Community notes