git show $(git rev-list --max-count=1 --all -- ranker/knowledge/city_province_map.py)^:ranker/knowledge/city_province_map.py
This gives me the error:
fatal: bad revision '^:ranker/knowledge/city_province_map.py'
I also tried:
git show HEAD^:ranker/knowledge/city_province_map.py
But this gives a similar error:
fatal: path 'ranker/knowledgw/city_province_map.py' does not exist in 'HEAD^'
I have a file deleted a while a ago and I want to see its content and restore it to the repository. I executed the two commands at the root directory of the git project in my local machine.
How to do that?