code: def record_git_info(self, commit=None):
          
          if commit is None:
              commit = self._repo.head.commit
          else:
              commit = self._repo.commit(commit)
          return GitInfo(
              hexsha=commit.hexsha,
              author=commit.author.name,
              email=commit.author.email,
              authored_on=commit.authored_datetime
          )
docs: Record git meta information.
  
          Parameters
          ----------
          commit : str, optional
              Unique hexsha of the desired commit.
  
          Returns
          -------
          GitInfo
              Git commit meta information.