M02 SELF-CHECK

Module 2 self-check

Five questions · 4/5 to pass · unlimited retry

1. What does staging select?
2. What does a clean Git status establish?
3. The editor shows the right file but a command cannot find scripts. What should you inspect first?
4. After a baseline commit, harmless build-note.tmp is newly staged by mistake. Which operation preserves the file while unselecting it?
5. Ordinary diff shows a later README edit; cached diff shows an earlier README edit. What would a commit record now?

Your result

Not attempted

Read the correct answers and explanations

Question 1

The current contents for the next commit.

Correct: staging records content at the time of selection.

Question 2

The relevant repository states agree under tracking/ignore rules.

Correct: it describes Git state, not engineering correctness.

Question 3

Terminal working directory and expected root files.

Correct: relative paths follow the terminal location.

Question 4

git restore --staged -- build-note.tmp

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

Question 5

The staged version shown by the cached comparison.

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