/** * Overloads the parent::createRepository method for the correct Repository class instance. * * {@inheritdoc} */ public function createRepository($path, $bare = null) { if (file_exists($path . '/.git/HEAD') && !file_exists($path . '/HEAD')) { throw new \RuntimeException('A GIT repository already exists at ' . $path); } $repository = new Repository($path, $this); return $repository->create($bare); }