code: public function getVersion()
      {
          if (isset(self::$version)) {
              return self::$version;
          }
          if (0 !== $this->process->execute('git --version', $output)) {
              return;
          }
          if (preg_match('/^git version (\d+(?:\.\d+)+)/m', $output, $matches)) {
              return self::$version = $matches[1];
          }
      }
docs: Retrieves the current git version.
  
  @return string|null The git version number.