To hard reset a single file we do something like:
git checkout HEAD -- my-file.txt
or,
git restore my-file.txt
what if we want to restore the file to a different location or with a different name.
i mean i do not want to change my current my-file.txt
but want to restore the previous copy of that file as my-file-old.txt
.
How can I do that?