In git, how to I revert everything in a specific directory to how it was at a given SHA, leaving changes elsewhere in the repo untouched?
Asked
Active
Viewed 139 times
1 Answers
2
It sounds like you want:
git checkout REVISION -- path/to/revert
Just to play it safe, save off your changes elsewhere before doing this. There's no way back if you have local modifications.

John Szakmeister
- 44,691
- 9
- 89
- 79