Git

How do you revert a specific file to previous commit?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

git checkout HEAD~1 -- /path/of/the/file