Practice commits, branches, collaboration, conflict resolution and safe recovery from history mistakes.
Four self-study difficulty levels, from basic concepts to advanced scenarios. Difficulty is an editorial guide, not an official certification ranking. Git command-line concepts in a practice repository. Inspect local changes and coordinate shared-history changes before using destructive commands.
YOUR PRACTICE SPACE
Learn it. Test it. Understand it.
Recognize core concepts and trace a single step.
10 questions in Easy · one answer per question · no timer
Free, no account needed. Answers stay in this tab and reset on reload. This is self-study, not a proctored exam or certificate.
Choose the right challenge
Easy checks core concepts. Medium applies them to tasks. Hard examines edge cases and failure modes. Very advanced combines constraints such as concurrency, security and recovery. Start where you are comfortable; each level has its own attempt and result. These labels are editorial, not certification grades.
What you will learn
Distinguish the working tree, staging area and commit history.
Choose suitable merge, rebase and recovery operations.
Reason about commit graphs and concurrent collaboration.
Think through a real scenario
You staged a configuration change, then edited the same file again. The next ordinary commit records the staged version, not automatically the newest working-tree content. Compare git diff and git diff --staged before committing. This separation lets you prepare a coherent change, but also means that a passing test on unstaged code may not describe the exact content you commit.
Turn your result into a study plan
For each missed question, write down the rule you overlooked and test it with a small example. Avoid memorizing an option’s position: understanding the behavior matters more than recognizing the wording. In exam mode explanations stay hidden until you submit; in practice mode use “Check answer” to see feedback immediately.
Read further
The questions and explanations are original EmuPath teaching material. These references provide background for further study; their publishers do not endorse this exam.
Found an ambiguous question? Include the track and question text in your correction report.
Sample Git & Version Control questions with explanations
Preview one question from each difficulty level before choosing a practice session. These examples also appear in the question bank. Try answering first, then open the explanation to check your reasoning.
Easy: Snapshots
What does a Git commit principally record?
A project snapshot with metadata and parent relationships
Only the filename of the latest edited file
The current contents of every remote repository
Every untracked file on the computer
Show answer and explanation
A project snapshot with metadata and parent relationships
A commit identifies a tree snapshot and associated history metadata. Untracked or unstaged work is not automatically included in an ordinary commit.
Medium: Index
You stage file A and then edit A again. What does an ordinary git commit include for A?
The version last staged in the index
Always the newest working-tree bytes
Both versions as two separate files
No version because the working tree changed
Show answer and explanation
The version last staged in the index
Staging captures content at that moment. Later edits remain unstaged unless added again, so inspect both diffs to understand exactly what the commit contains.
Hard: Rebase
Why do rebased commits usually receive new identifiers even when their patches are similar?
Their parent relationships and possibly other commit content change
Git changes all identifiers at midnight
Branch names are encrypted into every file
The working directory name is always part of the commit ID
Show answer and explanation
Their parent relationships and possibly other commit content change
Commit identity derives from commit content, including parents. Replaying work onto another base therefore normally creates different objects rather than preserving the original commits.
Very advanced: Leases
Why can an explicit expected remote object ID make a force-with-lease push safer than an unconditional force push?
It rejects the update if the remote reference differs from that expectation
It guarantees no reviewer can disagree with the change
It prevents every future update to the branch
It encrypts all unreachable commits
Show answer and explanation
It rejects the update if the remote reference differs from that expectation
A lease is a concurrency check on the reference being replaced. An explicit expected value avoids relying only on a remote-tracking ref that background fetches may have moved.