Git 2.23 introduced git restore command to restore working tree files.
https://git-scm.com/docs/git-restore
To restore all files in the current directory
git restore .
If you want to restore all C source files to match the version in the index, you can do
git restore '*.c'