def read_git_commit_timestamp(repo_path=None, repo=None):
if repo is None:<EOL><INDENT>repo = git.repo.base.Repo(path=repo_path,<EOL>search_parent_directories=True)<EOL><DEDENT>head_commit = repo.head.commit<EOL>return head_commit.committed_datetime<EOL>
Obtain the timestamp from the current head commit of a Git repository.

    Parameters
    ----------
    repo_path : `str`, optional
        Path to the Git repository. Leave as `None` to use the current working
        directory.

    Returns
    -------
    commit_timestamp : `datetime.datetime`
        The datetime of the head commit.