def get_commit(repository):
    """
    Get current commit ID.

    :param repository: repository
    :type repository: git.Repo
    :return: commit ID
    :rtype: str or unicode
    """
    return repository.head.commit.hexsha