How do I perform the equivalent of the TFS \'Undo pending changes\' in Git, on one or multiple files?
That basically means to do these steps:
This command will undo local changes and restore them to the current versions in the repository:
git reset --hard
You can revert to your last valid commit by issuing:
git reset --hard HEAD
If you just want to restore just one file, use git checkout instead:
git checkout -- file_name.extension
git checkout HEAD file_name.extension