Skip to content

Latest commit

 

History

History
9 lines (6 loc) · 311 Bytes

revert-file-to-previous-commit.md

File metadata and controls

9 lines (6 loc) · 311 Bytes

Revert file to some previous commit

To revert a file in git to some previous commit, just check out the individual file at the hash of that commit:

git checkout c5f567 -- file1/to/revert 

Hat tip