I created a script to grab specific files from GitHub repository via their API and save them locally. My issue is that each time I run this script, I want to know if that file has changed. I found a way to do this by comparing the SHA value returned when you make the request to the API, but this way is kind of inefficient because to get that SHA value I have to download the file, so in that way I'm always downloading the file and that is what I don't want.
So if anybody knows how to check if the file has changed without downloading it again please let me know.