gitHashObject function

Obtain the git hash of an existing file.