# Q02 — Module 2 self-check

Answer five questions. Pass at 4/5; retry without limit. Explanations support learning, not exam security. A passing score does not certify physical testing.

## 1. What does staging select?

A. The current contents for the next commit.
B. Every future edit to the same file.
C. A remote upload destination.

<details><summary>Answer and explanation</summary>

Correct: A. Correct: staging records content at the time of selection.

- B: Later edits can remain unstaged and need separate review.
- C: Remotes configure destinations; staging chooses snapshot contents.

</details>

## 2. What does a clean Git status establish?

A. All physical behavior is correct.
B. The relevant repository states agree under tracking/ignore rules.
C. Every test ran successfully.

<details><summary>Answer and explanation</summary>

Correct: B. Correct: it describes Git state, not engineering correctness.

- A: Repository state does not measure hardware.
- C: Test success requires an actual command and result.

</details>

## 3. The editor shows the right file but a command cannot find scripts. What should you inspect first?

A. Terminal working directory and expected root files.
B. Account billing plan.
C. Warning threshold implementation.

<details><summary>Answer and explanation</summary>

Correct: A. Correct: relative paths follow the terminal location.

- B: Billing cannot explain a local relative-path mismatch.
- C: Changing policy does not fix a wrong folder.

</details>

## 4. After a baseline commit, harmless build-note.tmp is newly staged by mistake. Which operation preserves the file while unselecting it?

A. git restore --staged -- build-note.tmp
B. Delete the entire repository.
C. git restore -- README.md

<details><summary>Answer and explanation</summary>

Correct: A. Correct: this updates staging and retains working content in the specified state.

- B: Deletion loses useful work and does not match the task.
- C: This targets another file and working content, not the unwanted staging selection.

</details>

## 5. Ordinary diff shows a later README edit; cached diff shows an earlier README edit. What would a commit record now?

A. Both versions automatically.
B. Only the latest editor text.
C. The staged version shown by the cached comparison.

<details><summary>Answer and explanation</summary>

Correct: C. Correct: inspect and restage if the later edit should be included.

- A: A commit records one selected snapshot, not both versions.
- B: Later working edits do not automatically join staging.

</details>
