Rocketeer\Services\Connections\ConnectionsHandler::getRepositoryBranch PHP Method

getRepositoryBranch() public method

Get the repository branch to use.
public getRepositoryBranch ( ) : string
return string
    public function getRepositoryBranch()
    {
        // If we passed a branch, use it
        if ($branch = $this->getOption('branch')) {
            return $branch;
        }
        // Compute the fallback branch
        exec($this->scm->currentBranch(), $fallback);
        $fallback = Arr::get($fallback, 0, 'master');
        $fallback = trim($fallback);
        $branch = $this->rocketeer->getOption('scm.branch') ?: $fallback;
        return $branch;
    }