def git_tree_add(struct, prefix=""):
    for name, content in struct.items():
        if isinstance(content, string_types):
            shell.git('add', join_path(prefix, name))
        elif isinstance(content, dict):
            git_tree_add(struct[name], prefix=join_path(prefix, name))
        elif content is None:
            shell.git('add', join_path(prefix, name))
        else:
            raise RuntimeError("Don't know what to do with content type "
                               "{type}.".format(type=type(content)))
Adds recursively a directory structure to git
dataset/ETHPy150Open blue-yonder/pyscaffold/pyscaffold/repo.py/git_tree_add