Git Command Helper
Complete Git command reference with examples and common flags
A searchable reference covering the full Git command set, from everyday staging, branching, and remotes to rebasing, bisecting, submodules, worktrees, and the plumbing commands underneath, each with a short explanation, examples, and common flags. Keep it open while you work to avoid context-switching to a search engine.
How to use Git Command Helper
- Browse or search for the task you want to accomplish.
- Read the matching Git command and what it does.
- Copy the example and adapt it to your repository.
- Run it in your terminal with confidence.
Frequently asked questions
How do I undo my last commit?
Use git reset --soft HEAD~1 to undo the commit but keep your changes staged, or git reset --hard HEAD~1 to discard them entirely. The helper lists the safe variants.
What's the difference between merge and rebase?
Merge preserves history and creates a merge commit, while rebase replays your commits on top of another branch for a linear history. The reference explains when to use each.
How do I discard local changes to a file?
Use git restore <file> (or git checkout -- <file> on older Git) to revert it to the last committed state; the helper shows the current syntax.
Related Text & Code tools
- Markdown Editor: Live GitHub-flavored markdown preview with syntax highlighting and Mermaid diagrams
- HTML Previewer: Preview HTML code in real-time with live rendering
- Text Statistics: Analyze text with word count, character count, and more
- String Case Converter: Convert text between different cases (camelCase, snake_case, etc.)
- Text Diff Checker: Compare two texts side by side with highlighting