Many times we wanted to retrieve a single file from old commit, below is the simple command to get the job done.
git checkout <commit_hash_value> <file_path_to_retrive>
We can also use HEAD reference in place of hash value:
HEAD will get file from last commitHEAD^ : Last Commit - 1HEAD^^ : Last Commit - 2HEAD~10 : 10 Commits behind the git HEAD