Git · Middle · Question 56 of 75
What does git restore --source=HEAD~2 file.js do?
- 1Creates a commit that restores the file
- ✓Correct answer: Puts the file's version from two commits ago on disk
- 3Moves the branch back two commits for that file only
Explanation
Only the file changes; history and the branch stay. Commit the result if you want to keep the old version.