Skip to content

GitHub Cheat Sheet

A list of hidden and lesser-known features of Git and GitHub, with examples.

Stars
60.1k
Forks
5.5k
Licence
MIT
Language
—
Last update
2.6 years ago
Type
Curated list

No commits in over a year — check for forks or alternatives before adopting.

What it is

This is a reference page of tips for Git and GitHub, collected as short sections with example URLs, commands, and screenshots. It covers things like comparing branches, filtering diffs by whitespace, viewing one author's commits, and using Gists. It was inspired by talks by Zach Holman on Git and GitHub secrets.

  • Append ?w=1 to a diff URL to hide whitespace-only changes
  • Compare two branches or a date range by editing a GitHub compare URL
  • View all commits by one author by adding ?author= to a commits URL
  • Clone a repository and read the git-related tips alongside it

Great for

  • Developers who already use Git and GitHub daily and want to discover lesser-known features
  • Students learning Git and GitHub who want practical examples
  • Team leads looking for tips to share with their team

Not ideal for

  • Complete beginners who need step-by-step Git fundamentals, since it assumes some familiarity with the tools
  • People looking for software to install, because this is a document rather than a program
  • Anyone needing current GitHub documentation, since the README links to older help articles and the last push was in April 2024
Step-by-step guide: how to use GitHub Cheat SheetInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Read it online

    You'll need: Git (for the cloning example)

    Clone the repository

    git clone https://github.com/tiimgreen/github-cheat-sheet
  2. 2

    Run it

    • Open the README on GitHub or in a local clone.
    • Use the table of contents to jump to a topic, such as Diffs or Branch.
    • Try a tip in a browser on a repository you can access, such as adding ?w=1 to a diff URL.
    • Explore the Git section for tips like aliases and styled git log.
  3. 3

    Get the most out of it

    • Use the Ignore Whitespace tip (?w=1) when reviewing pull requests with formatting changes
    • Use the Comparing Branches section to compare across forks with the owner:branch syntax
    • Set up the Aliases and Auto-Correct git configurations described in the Git section
    • Check the Git Resources section for books, videos, and articles to go deeper

Downloads

Strengths

  • Short, example-driven sections that are quick to scan
  • Covers a wide range of GitHub web features in one place
  • Widely starred and long-lived, with MIT license

Trade-offs

  • Some tips reference old GitHub URLs, examples use 2012-2014 repositories, and some features may have changed
  • Many sections are about the GitHub website, not Git itself, so behavior may differ by platform updates
  • No version tracking or releases, so it is hard to know which tips are still accurate

How it compares

ProjectStarsTypeLevelUpdatedBest for
github-cheat-sheet (this)60.1kCurated listbeginner2.6 years agoDevelopers who already use Git and GitHub daily and want to discover lesser-known features
learnGitBranching34.2kLearning resourcebeginner6 days agoBeginners who want to see what git commands do to commits and branches
gitea58.8kAppintermediate4 days agoTeams that want to host their own code instead of using a public cloud service
desktop22kAppbeginner6 days agoDevelopers who work with GitHub and prefer a visual interface for commits and branches
git-history13.7kAppbeginner2.1 years agoDevelopers trying to understand why a file looks the way it does
public-apis495kCurated listbeginner4 days agoDevelopers looking for a third-party API to add to a side project

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.