I am attempting to create a bash script that clones a repository off of a Github account and places it on an NFS volume on a Raspberry Pi cluster. It will be run via cron job at midnight daily. Of course, I don't want to pull from this repo more than I need to. Cloning is done easily enough in the bash script, but how would I check for differences between the current copy of the directory on my machine and the current revision of the repository? I see guides on how to do this with branching and the like, but I don't want to make any changes to the source. I just want to check the differences and re-run git clone --depth=1 https://github.org/somerepo/something
to the NFS directory if there have been changes.
If I'm misunderstanding how cloning works, please let me know.