GitHub Cheat Sheet logo

GitHub Cheat Sheet

Free

A collection of cool hidden and not so hidden features of Git and GitHub.

FreeFree tier
Type
Open Source

About GitHub Cheat Sheet

A curated community cheat sheet listing hidden and not-so-hidden features of Git and GitHub, inspired by Zach Holman's talks at Aloha Ruby Conference 2012 and WDCNZ 2013. Covers a wide range of topics including whitespace handling in diffs, adjustable tab space display, viewing commit history by author, cloning repositories without the .git suffix, GitHub keyboard shortcuts, line highlighting in files, closing issues via commit messages, task lists in Markdown, image rendering and diffing, and styled Git log/status. The repository is open-source and available in multiple languages.

Key Features

Whitespace ignore in diffs via ?w=1
Adjustable tab space display via ?ts=4
View commit history filtered by author
Clone repositories without .git suffix
GitHub keyboard shortcuts for navigation
Line highlighting in code files
Close issues automatically via commit messages
Task lists in Markdown documents
Rendering and diffing images inline
Styled Git log and status commands

Pros & Cons

Pros
  • Comprehensive collection of over 100 tips
  • Community-maintained and open-source
  • Free to access and use
  • Regularly updated with new features
  • Well-organized with table of contents and multilingual translations
Cons
  • Not an official GitHub resource
  • Some features may become outdated as GitHub evolves
  • Primarily a list without interactive tutorials
  • Requires basic Git/GitHub knowledge to fully benefit

Best For

Learning advanced Git and GitHub featuresImproving development workflow efficiencyExploring hidden functionality in GitHubOnboarding new developers to Git/GitHubQuick reference for Git tips and tricks

FAQ

What is the GitHub Cheat Sheet?
A list of cool hidden and not-so-hidden features of Git and GitHub, inspired by Zach Holman's talks.
How do I ignore whitespace in diffs?
Add ?w=1 to any diff URL to remove whitespace changes.
How do I adjust tab space in diffs?
Add ?ts=4 to a diff or file URL to display tab characters as 4 spaces (the number can be changed).
How do I view commit history by a specific author?
Add ?author={user} to the commits URL, e.g., https://github.com/rails/rails/commits/master?author=dhh.
Can I clone a repository without the .git suffix?
Yes, you can omit .git from the clone URL, e.g., git clone https://github.com/tiimgreen/github-cheat-sheet.
What is Git.io?
A URL shortener service for GitHub, referenced in the cheat sheet (shortlink: http://git.io/sheet).