My local git repository is inside encrypted volume. I would like to be able to run git pull --all
only when the remote has new commits. However, I'm unable to use post-receive hook like here since I don't have the password to the encrypted volume. This means that even if the hook will be triggered I still don't know the password to mount the volume and to pull the new changes. So I'm looking for some other alternatives, one possible way I was thinking of was to ask the remote for the latest version SHA and compare it with the latest version SHA that the local copy knows, if they match I don't need to run pull command and if they don't match then I need to run the git pull command.
Is there a way I can run git rev-parse master
on the remote repository?
You can get more background about my problem here