Skip to main content

Module Quiz

Complete this after the concept and practice pages. Answer from memory first, then correct using the linked concept pages.

There are 23 questions: 18 current-module and five review questions. Give one point only when the answer and explanation are correct; equivalent wording is accepted. Preserve your attempt before expanding calibration. If you already saw an answer, use a fresh scenario on the same concept.

Current Module Questions​

Question 1: Snapshot Model​

What is the most useful mental model for a Git commit?

a) A zip file of only changed lines
b) A snapshot of the project state plus metadata and parent links
c) A copy of the working directory outside the repository
d) A remote backup event

Reveal calibration after your attempt

Answer: (b)
Why: Git thinks in snapshots and references, not just file-by-file deltas.
Remediation: Review Git Mental Model.

Question 2: The Index​

What is the index or staging area?

Reveal calibration after your attempt

Answer: It is the proposed next commit. It holds the exact file versions Git will use when you commit.

Question 3: Reading Diffs​

What is the difference between git diff and git diff --staged?

Reveal calibration after your attempt

Answer: git diff compares the working tree to the index. git diff --staged compares the index to the last commit.

Question 4: Commit Scope​

Why is git add -p valuable?

Reveal calibration after your attempt

Answer: It lets you stage selected hunks instead of whole files, so unrelated edits can be split into separate commits.

Question 5: History Inspection​

Which command combination is most useful for quickly seeing branch shape and commit messages?

a) git status --graph
b) git log --oneline --graph --decorate --all
c) git show --cached
d) git branch --full

Reveal calibration after your attempt

Answer: (b)

Question 6: Branch Meaning​

What happens when you create a branch with git branch feature?

Reveal calibration after your attempt

Answer: Git creates a new movable reference pointing at the current commit. It does not copy the repository files.

Question 7: Merge vs Rebase​

When is rebasing usually acceptable?

Reveal calibration after your attempt

Answer: On local, unpublished topic branches where you want a cleaner linear history and are not rewriting shared history.

Question 8: Fetch vs Pull​

What is the difference between git fetch and git pull?

Reveal calibration after your attempt

Answer: fetch downloads needed objects and updates refs according to the request/configuration, including the relevant remote-tracking refs; it does not ordinarily integrate into the checked-out branch. pull fetches then integrates according to flags/configuration, for example fast-forward-only, merge or rebase.

Question 9: Remote-Tracking Branches​

What does origin/main represent?

Reveal calibration after your attempt

Answer: A local remote-tracking reference recording the last observed state of origin’s main when that reference was updated. It can be stale; communicating about some other branch does not necessarily refresh it.

Question 10: Push Behavior​

Does git push always publish only a branch named explicitly on the command line?

Reveal calibration after your attempt

Answer: No. Git does not automatically publish a local commit, but a push can select refs from explicit arguments or configured defaults; options can select multiple refs. Inspect the remote and selection. The lab uses explicit local remote and branch names.

Question 11: Conflict Resolution​

What do the <<<<<<<, =======, and >>>>>>> markers mean during a merge?

Reveal calibration after your attempt

Answer: They mark conflicting sections from two versions of the file so you can edit the final intended result manually.

Question 12: Pull Request Quality​

What makes a pull request easier to review?

a) Large scope and many unrelated changes
b) Small focused changes with a clear description
c) Opening it only after many weeks of work
d) Avoiding commit messages because the diff is enough

Reveal calibration after your attempt

Answer: (b)

Question 13: Commit Discipline​

Why are many small coherent commits usually better than one giant commit?

Reveal calibration after your attempt

Answer: They tell a clearer story, make review easier, simplify debugging, and reduce the cost of reverting or reworking part of the change.

Question 14: Safe Recovery​

You want to temporarily shelve unfinished work before switching branches. What Git feature fits that need?

Reveal calibration after your attempt

Answer: git stash push shelves tracked staged/unstaged work. Untracked files require deliberate -u; ignored files are excluded from that option. Inspect what was saved and prefer apply-then-verify before dropping the entry.

Question 15: Reflog​

What problem does git reflog help solve?

Reveal calibration after your attempt

Answer: It records local reference movements and can help locate a previous committed tip. Entries may expire, and it does not back up never-recorded working files. Inspect the intended commit and name it with a recovery branch.

Question 16: Safe Rebase​

You have a local branch with three commits that nobody else has pulled. main moved forward. What is a safe rebase workflow, and what should you inspect afterward?

Reveal calibration after your attempt

Answer: Fetch first, rebase the local branch onto the updated remote-tracking branch, resolve conflicts one commit at a time, then inspect git log --oneline --graph --decorate and run tests before pushing. If the branch was already published, coordinate before force-pushing or prefer merge.

Question 17: Remote-Tracking References​

Why is origin/main not the same thing as main?

Reveal calibration after your attempt

Answer: main is your local branch. origin/main is a local remote-tracking reference updated by relevant fetches and sometimes successful pushes. It can be stale and is not the live server branch.

Question 18: Reviewable History​

Name three signs that a branch history is ready for review.

Reveal calibration after your attempt

Answer: Commits are focused, each commit builds or is at least easy to reason about, the branch has no accidental debug or generated files, and the final diff matches the pull request description.

Interleaved Review Questions​

Prior Module Question 1: Systems vs Intentions​

Why is "commit at the end of every coherent work unit" stronger than "use Git more consistently"?

Reveal calibration after your attempt

Answer: The first is a repeatable system with a trigger and observable behavior. The second is only a vague intention.

Prior Module Question 2: Shell Navigation​

Why does it matter that you know where the repository root is before running Git commands?

Reveal calibration after your attempt

Answer: Because repository context, relative paths, and command output all depend on where you are in the filesystem.

Prior Module Question 3: Streams​

Why is reading stderr useful during Git failures?

Reveal calibration after your attempt

Answer: Stderr often contains error details, but also inspect stdout, exit status and git status: a merge conflict can report useful information on stdout. Neither stream alone establishes success.

Prior Module Question 4: Reproducibility​

How does Git support the reproducibility mindset from Module 02?

Reveal calibration after your attempt

Answer: It records change history, preserves workflow decisions, and makes development state shareable and reviewable.

Prior Module Question 5: Automation​

What kind of repeated Git task might belong in an alias or small script?

Reveal calibration after your attempt

Answer: A frequently repeated inspection sequence such as status, branch -vv, and a short graph log.

Scoring and Remediation​

Mastery (90-100 percent):

  • At least 21/23 meets the numerical 90% threshold. Close the practical evidence and repair missed concepts before module completion; the remaining Launchpad gates still apply.

Proficient (75-89 percent):

  • Review each missed concept and repeat the matching practice page.

Developing (60-74 percent):

  • Redo the repository-state and branching labs before advancing.

Insufficient (<60 percent):

  • Rework Cluster 1 and Cluster 2 with fresh hands-on repository practice, then retake the quiz.

Remediation Map​

  • Misses on Questions 1-4: revisit snapshots, the index, and commit construction
  • Misses on Questions 5-7: revisit history reading, branches, merges, and rebases
  • Misses on Questions 8-12: revisit remotes, collaboration, and conflict handling
  • Misses on Questions 13-18: revisit commit discipline, remotes, rebase safety, and recovery tools