Look up the exact Git command syntax when you remember what you want to do but not how to do it.
Discover Git tricks and shortcuts you didn't know existed to work faster with version control.
Build a mental model of Git as a beginner by learning commands organized by practical task.
Quickly find advanced techniques like cherry-picking commits or using binary search to find bugs.
This repository is a community-curated cheat sheet of practical Git commands and tricks. Git is the version-control system used by most software projects to track changes to files, manage branches, and coordinate work between multiple people. While Git is enormously powerful, it has dozens of subcommands and obscure flags, and even experienced developers regularly forget the exact incantation for something they only do once in a while. The project gathers the most commonly needed of those incantations in one place. The content itself is a long list of short tips, each one pairing a sentence describing what you want to do with the exact Git command that does it, things like quickly switching to your previous branch, deleting a remote branch or tag, undoing local changes, rewriting the previous commit message, staging only parts of a changed file, cherry-picking commits across branches, recovering a deleted file, creating new worktrees, finding which commit introduced a bug using binary search, and force-pushing safely. The tips are grouped into sections like Basic Operations, Branching, and Log and History. All commands were tested on git version 2.7.4. You would use it as a quick reference whenever you think "I know Git can do this, but I can't remember how." Alongside the written list, the project offers a companion command-line tool called git-tip, published on NPM, that lets you browse the same tips from your terminal, and an interactive GitBook version is linked. The README also points to community translations into Chinese, Russian, Korean, Vietnamese, Japanese, Nepali, Polish, and Persian. The full README is longer than what was provided.
Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.