explaingit

tiimgreen/github-cheat-sheet

56,928Audience · developerComplexity · 1/5DormantLicenseSetup · easy

TLDR

A curated reference guide of lesser-known Git and GitHub tips, tricks, and shortcuts to work faster on version control and the GitHub platform.

Mindmap

mindmap
  root((repo))
    GitHub Web Tips
      URL query tricks
      Keyboard shortcuts
      Line highlighting
      Auto-close issues
    Git Command Tips
      Branch shortcuts
      Empty commits
      Log formatting
      Search commits
    Practical Uses
      Debug faster
      Compare branches
      Track authors
      Trigger pipelines
    Format
      Markdown reference
      No installation
      Browser readable

Things people build with this

USE CASE 1

Speed up debugging by searching commit messages and viewing prettified git logs to find which commit introduced a bug.

USE CASE 2

Highlight specific lines in code reviews by appending line numbers to GitHub URLs for clearer feedback.

USE CASE 3

Automate issue closure by using special phrases in commit messages to close related issues without manual clicks.

USE CASE 4

Create custom Git aliases to shorten frequently-used commands and reduce typing in daily workflows.

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

GitHub Cheat Sheet is a reference document, not runnable software, that collects useful but often overlooked features of the Git version control system and the GitHub platform. It is a curated list of tips, tricks, and URL patterns that can save time for anyone who uses GitHub regularly, from beginners who want to learn efficient workflows to experienced developers who may have missed less-publicized features. The document is organized into two main sections. The GitHub section covers things you can do inside the GitHub web interface: appending query parameters to URLs to filter diffs or compare branches across dates, keyboard shortcuts on the site, highlighting specific lines in code by adding a line number to the URL, closing GitHub issues automatically by writing special phrases in commit messages, embedding images in comments by pasting from the clipboard, and adding interactive task checklists to pull request descriptions. The Git section covers command-line techniques: how to return to the previous branch with a shortcut, how to create empty commits for triggering CI pipelines, how to view a prettified git log with color and graph formatting, how to search across all commit messages with a single command, and how to configure aliases that shorten common commands. There is no installation and no code to run. You read it as a reference and apply the individual tips in your own projects and workflows. You would use this resource when you want to work faster on GitHub, for example, when you need to track down which commit introduced a bug, compare two branches in a pull request, or quickly see all commits made by one author. There is no tech stack involved; it is Markdown prose that lives on GitHub and is readable in any browser.

Copy-paste prompts

Prompt 1
Show me how to use GitHub URL query parameters to compare two branches across different dates.
Prompt 2
What Git command can I use to search across all commit messages to find when a specific change was made?
Prompt 3
How do I set up a Git alias to quickly switch back to my previous branch?
Prompt 4
Explain how to embed images in GitHub comments by pasting from the clipboard.
Prompt 5
What keyboard shortcuts are available in the GitHub web interface to speed up code review?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.