def hash_file(path):
    return check_output(["git", "hash-object", "-w", "--", path]).strip()
Write file at path to Git index, return its SHA1 as a string.
dataset/ETHPy150Open larsmans/seqlearn/doc/hash-tree.py/hash_file