def commit(repo, message):
    """Commit the index to the repository

    The equivalent of :code:`git commit`

    Parameters
    ----------
    repo : dulwich.repo.Repo
    message : str
    """
    message = bytes(message, encoding='UTF-8')
    repo.do_commit(message)
