Best way to determine if a file has changed

I get a list of all the files in my Repository using the /git/trees API call and it returns me a list of everything with SHA’s associated with them.

However, when I compute the SHA of the local files I get a different result.

What is the best way to determine if my local file matches what is currently in Git Hub? I don’t want to compare the contents as that is very inefficient.

Thanks!

Git diff? Git status?

Not what I am looking for.

So you’re hoping to come up with a more efficient way to do something that git is built to do?

Are you sure what the API is returning is file hash(es) and not last relevant commit hash (SHA)?

Well, that’s a good question. The documentation isn’t really clear on what the SHA is for. If it’s for the Commit, then I won’t be able to use that.

My hope is that there is something I can query on Git Hub (rather than downloading the contents of the blob) that would either give me an SHA of the file, or something like a Date Time Stamp so I don’t have to pull the blob down and do a file compare with the one on my hard drive.