Revert a file from particular commit after push in git code example Example: git revert one file git checkout HEAD -- /directory/my-file.txt