@task
def clone_repo(reset=False):
    if os.path.exists(repo_root) and reset:
        shutil.rmtree(repo_root)
    if os.path.exists(repo_root):
        with cd(repo_root):
            run("git pull")
    else:
        run("git clone %s %s" % (repo, repo_root))
Clone the repo
dataset/ETHPy150Open jupyterhub/jupyterhub/tools/tasks.py/clone_repo