Yes, just:
git show :filename
If you have multiple versions of the index (for example, in a merge conflict situation), you can view the versions in different index slots with:
git show :1:filename git show :2:filename git show :3:filename
In most other cases, only slot 0 is populated, and :0:filename is the identifier for the cached version of the file. :filename is short for :0:filename .
Charles Bailey
source share