What I intend to do is similar to what's written here. I did what the top answer says, however, I realised that I had squashed my commits.
This is what my commit history looks like:
Date: <date1>
commit 3
Date: <date2>
commit 2
commit 1
(I had squashed commit 1 into commit 2.)
As it says in the top answer to the question linked above, I did git show HEAD~2: file.x
but that shows me the file before commit 1, and doing git show HEAD~1: file.x
shows me the file after commit 2.
How do I view the file after commit 1 but before commit 2?