code: def get_git_changeset():
      
      git_log = Popen(
          'git log --pretty=format:%ct --quiet -1 HEAD',
          stdout=PIPE, stderr=PIPE, shell=True, universal_newlines=True)
      timestamp = git_log.communicate()[0]
      try:
          timestamp = datetime.utcfromtimestamp(int(timestamp))
      except ValueError:
          return None
      return timestamp.strftime('%Y%m%d%H%M%S')
docs: Get git identifier; taken from Django project.