I\'ve deleted a file with Git and then committed, so the file is no longer in my working copy. I want to look at the contents of that file, but not actually restore it. How can
git show HEAD^:path/to/file
You can use an explicit commit identifier or HEAD~n to see older versions or if there has been more than one commit since you deleted it.
HEAD~n