retrieve the original version of a C++ file

So I was working with a C++ project. Something wrong happened when I was trying to tar the file. Now when I open the file on Visual Studio Code it shows me this message.

The file will not be displayed in the editor because it is either binary, very large or uses an unsupported text encoding

It’s not only about Visual Studio Code, I can’t open the file on any text editor. The extension of the file still .cpp

How could I retrieve the original version of the file?!

retrieve the original version of a C++ file