Is there a possible way to keep only the latest version of some specific files on GitHub?
For example, I want to upload some pdf files to GitHub, but I don’t want to waste too much space keeping the history of those pdfs.
Although upload binary files to GitHub is not a good idea, it is really convenient.
No, there is no way to do that. Git is designed to track the history of a project, and if you don't want to track history, then you should not use Git. You can use a regular website, or a cloud bucket, if you'd like to store or persist data without storing history.
Note that Git LFS is not a good choice for this, because it also keeps history. The only difference is that files that you aren't using aren't on your local machine; they're only kept on the server. If you don't want to keep history, then there's no point in persisting old versions anywhere, even on the server.