Last Updated: January 3, 2026
30 quizzes
Show the changes and metadata for the most recent commit on the current branch
git Click an option to fill the blank:
View a one-line summary for each commit in the current branch history
git log --pretty=Click an option to fill the blank:
Compare staged changes against the last commit before committing
git diff Click an option to fill the blank:
See who last modified each line of a file to investigate a behavior change
git src/auth.jsClick an option to fill the blank:
Start a binary search to find the commit that introduced a failing test
git startClick an option to fill the blank:
Which command is best suited to inspect the detailed changes and metadata of a single commit?
You want to see only commits made by "Alice" in the last week. Which command is most appropriate?
Which command is best for finding all occurrences of the string "token" in the current version of tracked files?
During a bisect session, how do you tell Git that the currently checked-out commit does NOT have the bug?
You see a suspicious function in app/router.js and want to know who last changed each line. Which is the most direct command?
Order the steps to inspect which commit introduced a specific line in src/login.js and then review that commit's changes.
Drag and drop to reorder, or use the arrows.
Order the steps to use git bisect to find the commit that introduced a failing test.
Drag and drop to reorder, or use the arrows.
Order the steps to compare your staged changes against a specific previous commit.
Drag and drop to reorder, or use the arrows.
Order the steps to search commit history for bug-fix messages and then inspect one of the matching commits.
Drag and drop to reorder, or use the arrows.
You are currently on branch "feature/search-history". What will this command output?
1git branch --show-currentHEAD currently points to commit abc1234. What will this command output?
1git rev-parse --short HEADYou just ran git log --pretty=oneline and saw the latest commit hash is 9f8e7d6. What will this command output?
1git show -s --format=%HIn a bisect session, Git just determined commit 1122aabb is the first bad commit. What will this command output?
1git rev-parse --short HEADIdentify the incorrect command in this attempt to inspect a specific commit and its diff.
Click on the line(s) that contain the bug.
git log --onelinegit show abc1234 src/app.jsgit diff abc1234..def5678 src/app.jsgit blame src/app.jsFind the incorrect command in this workflow to start and drive a bisect session.
Click on the line(s) that contain the bug.
git bisect startgit bisect badgit bisect good maingit bisect okgit bisect resetSpot the mistake in this attempt to search commit messages for fixes and show one commit.
Click on the line(s) that contain the bug.
git log --grep fixcommit_hash=$(git log --grep fix -n 1 --format=%H)git show $commit_hash src/fix.jsMatch each Git history command to its primary purpose.
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Match the Git history search method to what it searches.
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Match the git bisect command to its role in the bisect workflow.
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Complete the commands to compare your working directory and staged changes against HEAD.
git diffgit diff git diff Click an option to fill blank 1:
Complete the commands to search for commits by author and then show the latest one.
git log --author= --pretty=onelineLATEST_COMMIT=$(git log --author= -n 1 --format=%H)git show Click an option to fill blank 1:
Complete the commands to narrow git blame to a specific line range while ignoring whitespace changes.
git blame src/config.jsClick an option to fill blank 1:
Select the line that shows the commit hash for the currently displayed commit.
Click on the line to select.
commit 9a3c6723ab6b9e4e2e9c9a5e4b5f1e321e5b926 (HEAD -> main)Author: Jane Doe <jane@example.com>Date: Mon Oct 18 14:23:45 2023 -0400 Fix bug in user authenticationSelect the line that indicates which lines were changed in this diff hunk.
Click on the line to select.
@@ -10,5 +10,6 @@ function authenticate(user) { if (!user) {- throw new Error("No user");+ throw new Error("User is required"); }+ return true; }Select the line that shows who last modified the shown line of code.
Click on the line to select.
3f6a9b1a (Alice Smith 2025-11-25 14:12:03 +0530 10) function validateEmail(email) {3f6a9b1a (Alice Smith 2025-11-25 14:12:03 +0530 11) const pattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;8c7d5e2f (Bob Lee 2025-11-26 09:45:18 +0530 12) return pattern.test(email);