Go Back
git checkout <COMMIT#> <path/to/the/messed/up/file>
Example:
git checkout f08a63ff4fa7b8479f8c698e5998ee1afcac3a4e Gemfile
FROM https://coderwall.com/p/pgqlkq/git-checkout-a-single-file-from-a-specific-commit