A configuration file is tracked in a Git repository. A change committed last week broke the website, and the team wants the file exactly as it was before that change. What does version control make possible?
Choose one.
Version control lets you return a file or a whole project to any earlier committed state.
Each Git commit stores a snapshot of the tracked files, so the version from before last week's change is still in the repository and can be restored (for example by reverting the faulty commit or checking out the old file). The distractors assume the earlier contents are missing, recoverable only from messages, or held only on GitHub; in Git every clone holds every committed version.
- Note that the file is tracked and the faulty change was committed.
- Recall that every commit is a full snapshot kept in the history.
- Recall that the local repository holds that history, not just GitHub.
- Choose restoring the file from an earlier commit.
Exam tip: Committed means recoverable: any earlier commit can be brought back.
Git vs GitHub: Version Control Fundamentals for GitHub Foundations (GH-900) — the lesson that teaches this.