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;
}