Accidentally deleted a file you didn’t mean to remove? Restore it by checking out

git checkout


Example:
git checkout HEAD foo.bar