Searchable Git command reference with examples. Find the right Git commands for branching, merging, rebasing, and more.
Git is the most widely used distributed version control system, tracking changes to source code across software development projects. With over 150 commands and thousands of flags, Git's command-line interface is powerful but complex. Even experienced developers regularly look up less common commands, flag combinations, and workflows.
This tool provides a searchable reference for Git commands organized by workflow — from basic operations to advanced rebasing, bisecting, and repository maintenance.
| Command | Purpose | Example |
|---|---|---|
| git status | Show working tree status | git status -sb |
| git add | Stage changes | git add -p (interactive staging) |
| git commit | Record changes | git commit -m "Fix login timeout" |
| git pull | Fetch and merge remote changes | git pull --rebase origin main |
| git push | Upload local commits | git push origin feature-branch |
| git diff | Show unstaged changes | git diff --cached (staged changes) |
| git log | View commit history | git log --oneline --graph |
| git stash | Temporarily shelve changes | git stash push -m "WIP login fix" |
| Command | Purpose | Example |
|---|---|---|
| git branch | List, create, delete branches | git branch -d feature-branch |
| git checkout | Switch branches or restore files | git checkout -b new-feature |
| git switch | Switch branches (modern) | git switch -c new-feature |
| git merge | Combine branch histories | git merge --no-ff feature-branch |
| git rebase | Reapply commits on new base | git rebase main |
| git cherry-pick | Apply specific commits | git cherry-pick abc1234 |
The reference is organized by practical tasks and categories including Setup and Basics, Commits, Fix Mistakes, Branching and Merging, Collaboration, History and Inspection, Workspace and Stash, Recovery and Safety, and Scaling and Performance. Each command guide includes when to use it, pro tips, and common pitfalls to avoid.
Yes, the tool includes natural language understanding. You can type questions like "how do I undo my last commit" or "revert changes" and it will interpret your intent and show relevant Git commands. The search interprets your question and displays matching command guides ranked by relevance.
Commands are tagged as Beginner, Intermediate, or Advanced. Beginners can focus on essential commands like git add, commit, and push. Intermediate users can explore branching, merging, and stashing. Advanced users can find commands for rebasing, cherry-picking, and repository maintenance.
Each command example has a Copy button that copies the exact command to your clipboard. Many commands also include adjustable parameters with sliders or text inputs, so you can customize values like commit counts or file paths before copying. The command updates in real-time as you adjust parameters.
Common Pitfalls highlight dangerous operations or frequently made mistakes for each command. These warnings help you avoid accidentally losing work, corrupting your repository, or creating problems for your team. They are especially important for destructive commands like force push or hard reset.
Yes, many command guides include an Alternatives section showing different ways to accomplish the same task. This helps you choose the right approach based on your specific situation. For example, undoing changes might show options for both local and already-pushed commits.
Yes, each command guide includes a Related section with links to other relevant commands. Clicking a related command jumps directly to that guide. This helps you discover connected workflows, like going from staging to committing to pushing, or from creating a branch to merging it.