Git Command Reference & Cheat Sheet
Search, browse, and copy git commands organized by workflow category.
About This Tool
The Git Command Reference is a comprehensive, searchable cheat sheet covering essential git commands organized by workflow category. Whether you are a beginner learning version control or an experienced developer needing a quick syntax reminder, this tool puts every common git operation at your fingertips.
All 11 workflow categories are covered: Setup, Staging, Committing, Branching, Merging, Remote, Stashing, Log/History, Undoing, Tagging, and Advanced operations like cherry-pick, bisect, worktree, and submodules. Each command entry includes the syntax, practical examples with comments, common flags, and real-world use cases.
The "What do you want to do?" reverse lookup feature is especially useful when you know what you want to accomplish but cannot remember the exact command. Type a natural description like "undo last commit" or "save work in progress" and the tool suggests the right git command instantly.
A visual workflow diagram at the top illustrates how changes flow between the Working Directory, Staging Area, Local Repository, and Remote Repository, along with the git commands that move changes between each stage. This mental model is essential for understanding how git works.
Everything runs entirely in your browser -- no data is sent to any server. You can use this tool offline once the page has loaded. If you need to build complex git commands visually, check out the Git Command Builder. For managing your git configuration, try the Git Alias Builder. To validate commit messages, see the Conventional Commits Linter.
How to Use
- Browse the command list by scrolling, or use the search bar to filter by command name, description, or intent.
- Click a category pill (Setup, Staging, Branching, etc.) to filter commands by workflow stage.
- Click on any command card to expand it and see the full syntax, example, flags, and use cases.
- Click the Copy button on any syntax or example block to copy it to your clipboard.
- Click individual flag badges to copy a specific flag.
- Toggle the lightbulb icon next to the search bar to enable "What do you want to do?" reverse lookup mode.
- In reverse lookup mode, type a natural description (e.g., "undo last commit") and click a suggestion to jump to the matching command.
- Use the keyboard shortcut Ctrl+Shift+C to copy the currently viewed example.
Popular Git Command Examples
FAQ
Is my data safe when using this tool?
Yes. This is a purely client-side reference tool. No data is sent to any server. All content is static and loaded in your browser. You can even use it offline once the page has loaded.
What git commands are included?
The reference covers all essential git commands organized into 11 categories: Setup (config, init, clone), Staging (add, restore, status, diff), Committing (commit, amend), Branching (checkout, switch, branch), Merging (merge, rebase), Remote (remote, fetch, pull, push), Stashing, Log/History (log, blame, show), Undoing (reset, revert), Tagging, and Advanced (cherry-pick, bisect, reflog, clean, worktree, submodule).
How does the reverse lookup feature work?
Click the lightbulb icon next to the search bar to enable reverse lookup mode. Then type what you want to do in plain English, such as 'undo last commit' or 'save work in progress'. The tool matches your intent against a curated database of common git tasks and suggests the appropriate command. Click a suggestion to jump directly to that command's detailed entry.
Can I use this as an offline reference?
Yes. Once the page has loaded in your browser, all content is available locally. You can bookmark the page and use it without an internet connection. The tool is entirely self-contained with no external API calls.
What does the workflow diagram show?
The visual diagram at the top illustrates the four main areas in a git workflow: Working Directory, Staging Area, Local Repository, and Remote Repository. Arrows show which git commands move changes between these areas (git add, git commit, git push going forward; git restore, git reset, git pull/fetch going backward).
How is this different from the Git Command Builder?
The Git Command Reference is a searchable cheat sheet for looking up syntax and examples. The Git Command Builder is an interactive tool that helps you construct git commands step by step using dropdowns and checkboxes. Use this reference when you need a quick reminder, and the builder when you need to construct a complex command with specific flags.
Does this tool cover advanced git operations?
Yes. The Advanced category includes cherry-pick, bisect, reflog, clean, worktree, and submodule commands with detailed syntax, examples, and use cases. These are operations that even experienced developers occasionally need to look up.
Related Tools
Git Command Builder
Build Git commands visually. Select operations, options, and flags to construct the correct git command with explanations.
Bash Cheat Sheet
Searchable bash command reference organized by category. File operations, text processing, networking, process management, variables, control flow, and string manipulation.
Vim Cheat Sheet
Interactive Vim cheat sheet with search, mode and category filters. Browse 100+ Vim commands for Normal, Insert, Visual, and Command-line modes.
Conventional Commits Linter
Validate commit messages against the Conventional Commits specification. Check type, scope, description, and body format.
.gitignore Generator
Generate .gitignore files by selecting languages, frameworks, and IDEs. Combine multiple templates instantly.
Git Alias Builder
Build useful git aliases with a GUI. Browse popular aliases, customize commands, and export as git config.