def is_git_repo(path):
    # This is how git itself does it
    return os.path.exists(os.path.join(path, '.git', 'HEAD'))
Determine whether given path names a git repository.
dataset/ETHPy150Open freenas/freenas-build/build/tools/checkout.py/is_git_repo