I mistakenly delete lots of previous content from current working file foo. md
,
then need go back to the head of the single file's status of yesterday and copy that contents then switch to the current head and paste it.
Refer to the answer git - Hard reset of a single file - Stack Overflow
git checkout HEAD -- my-file.txt
it will jump to its state in the index with that from HEAD but side effect to erase the modifications of today.
How could reset to the status of yesterday and back to the current with the file unchanged?