Problem Statement
Explain `git restore` and `git restore --staged` as modern replacements for older patterns.
Explanation
`git restore <path>` restores file content in working tree from HEAD (or a commit). `git restore --staged <path>` un-stages changes (like `git reset <path>`). They split file restore from branch switching for clarity.
Practice Sets
This question appears in the following practice sets: