Intermediate Git & Version Control
Q67 / 100

What happens when you run "git checkout -- <file>" (or "git restore <file>")?

Correct! Well done.

Incorrect.

The correct answer is A) It discards uncommitted changes to the specified file in the working directory, reverting it to match the version in the index (staging area) or last commit

A

Correct Answer

It discards uncommitted changes to the specified file in the working directory, reverting it to match the version in the index (staging area) or last commit

Explanation

This command discards local, unstaged modifications to a file — a potentially destructive operation since those changes cannot be recovered afterward, unlike staged or committed changes.

Progress
67/100