git checkout file of different commit code example Example: checkout file of different commit git checkout <COMMIT#> <path/to/the/messed/up/file>