To roll back to an old git commit try this
git checkout [CommitHash] .
Note: You should not leave out the dot '.' at the end. This will apply whole changes to the tree.
And if you are in the subdirectory then it will make the changes in the current directory.
For the whole to be changed, run this command on the git project root.
Undo this by using
git reset --hard
NOTE: This will delete all modifications from the working directory.