Sometimes we mess around with a file and than there is a desire to have a particular state of this file back to the workspace.
That's pretty easy in Git and well discussed on the internets. However, maybe as a personal reminder, it can be achieved like the following:
git checkout <COMMIT#> <path/to/the/messed/up/file>
git checkout f08a63ff4fa7b8479f8c698e5998ee1afcac3a4e Gemfile