Git Command Lookup

Look up real Git commands by task with syntax and examples.

  • Runs locally in your browser
  • No upload required

Try it

git reset [undo]
git reset [--soft | --mixed | --hard] <commit> Move HEAD (and optionally the index and working tree) to a commit. Example: git reset --soft HEAD~1
git reset — git reset [--soft | --mixed | --hard] <commit>

Supported formats

Input
text
Output
text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

1 Git command(s) match "undo last commit".

How it works

  • Read the search query and optional category filter.
  • Matched case-insensitively over each command's name, summary, category and aliases.
  • Returned each match with its syntax and a worked example.
  • The catalog is curated; an unmatched query is reported honestly as empty.

Methodology

  1. Curate a catalog of real Git commands from the Git reference and Pro Git.
  2. Match the query case-insensitively over each entry's name, summary, category and aliases.
  3. Return every match with its syntax and one example, or an explicit empty result.

Usage

  1. Type the task you want to do, for example "undo last commit".
  2. Optionally filter by category.
  3. Read the matching commands, their syntax and an example.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

Undo the last commit

jsonSelect to copy
{
  "query": "undo last commit",
  "category": "all"
}

Rename a branch

jsonSelect to copy
{
  "query": "rename branch",
  "category": "branch"
}

Force-push safely

jsonSelect to copy
{
  "query": "force push",
  "category": "remote"
}

Limitations

Why a curated catalog instead of generated advice

Git advice is easy to get subtly wrong: a misremembered flag can lose history. Every entry here is a real command with its documented syntax and a concrete example.

The tool is a lookup, not an assistant: it does not infer intent, invent flags, or run anything.

Frequently asked questions

Does this run the command for me?
No. The lookup only displays commands; nothing is executed and no repository is accessed.
What happens if nothing matches?
The result is explicitly empty. The tool never invents a command that is not in its curated catalog.

Sources

  1. git(1) — Git documentation — Git project
  2. Pro Git (2nd edition) — Scott Chacon and Ben Straub