DevToolsHub Free · Fast · 100% in your browser

Git Command Quiz

Pick the right Git command for real-world scenarios: undoing commits, stashing, rebasing, recovering lost work and more.

Question1 / 18
Score0
Streak0
Best streak0

You want to see who last changed each line of a file.

About this Git command quiz

Sharpen your Git skills with scenario-based questions. Each one describes a real situation, such as undoing the last commit, moving uncommitted changes to a new branch or rewriting history before a pull request, and asks which Git command solves it.

How to use the Git Command Quiz

  1. Read the scenario.
  2. Pick the Git command that solves it.
  3. Read the explanation of what the command does.

Example

Undo the last commit but keep the changes staged  →  git reset --soft HEAD~1

Frequently asked questions

What is the difference between git merge and git rebase?

Merge creates a merge commit joining two histories; rebase replays your commits on top of another branch for a linear history.

How do I recover a deleted branch?

Use git reflog to find the last commit of the branch and then git checkout -b branch-name <sha>.

Is my data safe?

Yes. The tool runs entirely in your browser using WebAssembly. Nothing you type or upload is sent to a server, logged or stored.

Is it free?

Yes, completely free with no sign-up, no limits and no watermarks. It also works offline once the page has loaded.

An unhandled error has occurred. Reload ✕