code: def get_last_commit_to_master(repo_path="."):
      
      last_commit = None
      repo = None
      try:
          repo = Repo(repo_path)
      except (InvalidGitRepositoryError, NoSuchPathError):
          repo = None
      if repo:
          try:
              last_commit = repo.commits()[0]
          except AttributeError:
              # Optimised for version 0.3.2.RC1
              last_commit = repo.head.commit
      return str(last_commit)
docs: returns the last commit on the master branch. It would be more ideal to get the commit
      from the branch we are currently on, but as this is a check mostly to help
      with production issues, returning the commit from master will be sufficient.