Technology Technology · Programming ● Easy

Git Commands quiz

Git becomes easier when you understand the state of your files instead of memorizing commands in isolation. This quiz covers the working tree, staging area, commits, branches, history, diffs, remotes, and safer ways to undo common mistakes. Each question uses a practical command-line situation and explains what the command changes, helping beginners build a mental model they can use in real repositories.

Start the quiz
Questions
10
Time
11 min
Difficulty
● Easy

About this quiz

Git becomes easier when you understand the state of your files instead of memorizing commands in isolation. This quiz covers the working tree, staging area, commits, branches, history, diffs, remotes, and safer ways to undo common mistakes. Each question uses a practical command-line situation and explains what the command changes, helping beginners build a mental model they can use in real repositories.

Quick info

Before you start

Best for

Developers learning Git from the command line

What you'll learn

Explain the difference between modified, staged, and committed states

Format

10 explanation-backed questions in about 11 minutes.

What you'll cover

A small map of the test

  1. 1Working tree, staging area, and commits
  2. 2Inspecting status and differences
  3. 3Creating and switching branches
  4. 4Viewing history and working with remotes
  5. 5Safer ways to unstage or restore changes
Audience

Who this quiz is for

  • Developers learning Git from the command line
  • Learners who know a few commands but want a clearer workflow model
Learning outcomes

What you should understand afterward

  • Explain the difference between modified, staged, and committed states
  • Choose the appropriate inspection or snapshot command for a situation
  • Recognize commands that can discard work and require extra care
Key concepts

Ideas this quiz checks

Working tree

The checked-out files you are currently viewing and editing.

Staging area

The index that holds the exact content intended for the next commit.

Commit

A recorded snapshot of the staged project state with metadata and a message.

Branch

A movable name pointing to a commit, used to develop lines of work independently.

Score guide

How to read your score

  1. 0–4 Rebuild the Git model

    Focus on the working tree, staging area, and commit before memorizing more commands.

  2. 5–7 Working command base

    You understand the everyday flow, with a few branch, remote, or restore details to reinforce.

  3. 8–10 Strong Git fundamentals

    You understand the state model and the commands behind a typical local workflow.

After the quiz

Recommended next steps

  • Create a disposable repository and observe status after every command
  • Review both unstaged and staged diffs before committing
  • Use branches for isolated work and inspect incoming remote changes before integration
References

Sources and further reading

How to play

Instructions

  1. You have 11 minutes total to answer 10 multiple-choice questions.
  2. Choose an answer to lock it in. The runner immediately shows the correct answer and explanation.
  3. Use Hint when you want a nudge, or Skip to move forward without answering.
  4. Keyboard shortcuts: A-D answer, H hints, S skips, Enter/ next, and previous.
  5. No signup required. Your progress is local to this quiz session.