src/Console/DeployCommand.php
protected function prepareRepository()
    {
        $config = $this->container['config'];

        $this->builder->clean($config['build.directory']); // clear out everything, including .git metadata

        $workingCopy = $this->git->workingCopy($config['build.directory']);

        $this->doGitInit($workingCopy, $config['deploy.git.url'], $config['deploy.git.branch']); // start again at last commit

        $this->builder->clean($config['build.directory'], true); // clear the old content but keep .git folder

        return $workingCopy;
    }
protected function prepareRepository()
    {
        $config = $this->container['config'];

        $this->builder->clean($config['build.directory']); // clear out everything, including .git metadata

        $workingCopy = $this->git->workingCopy($config['build.directory']);

        $this->doGitInit($workingCopy, $config['deploy.git.url'], $config['deploy.git.branch']); // start again at last commit

        $this->builder->clean($config['build.directory'], true); // clear the old content but keep .git folder

        return $workingCopy;
    }
protected function prepareRepository ( ) { $ config = $ this -> container [ 'config' ] ; $ this -> builder -> clean ( $ config [ 'build.directory' ] ) ; // clear out everything, including .git metadata $ workingCopy = $ this -> git -> workingCopy ( $ config [ 'build.directory' ] ) ; $ this -> doGitInit ( $ workingCopy , $ config [ 'deploy.git.url' ] , $ config [ 'deploy.git.branch' ] ) ; // start again at last commit $ this -> builder -> clean ( $ config [ 'build.directory' ] , true ) ; // clear the old content but keep .git folder return $ workingCopy ; }
Prepare the build directory as a git repository.

Maybe there's already a git repo in the build folder, but is it pointing to
the correct origin and is it on the correct branch? Instead of checking for
things that might be wrong, we'll just start from scratch.

@returns GitWorkingCopy
@throws RuntimeException
Prepare the build directory as a git repository .