def _git_commit(repo, msg, verbose=False):
    """Commit the current changes.

    :param repo: The repository to use.
    :type repo: :class:`git.repo.base.Repo`

    :param str msg: The commit message.

    :param bool verbose: (optional) If ``True`` git's standard output
        will be printed.

    """
    if repo is None:
        return
    res = repo.git.commit(m=msg)
    if verbose:
        print(res)
