Text & Code

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.

Runs in your browser · AI assist is the only opt-in exception · no tracking, no ads

How to use Git Command Helper

  1. Browse or search for the task you want to accomplish.
  2. Read the matching Git command and what it does.
  3. Copy the example and adapt it to your repository.
  4. 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