public function restoreStashedBranch()
{
if (null === $this->stashedBranch) {
return;
}
if (!$this->isWorkingTreeReady()) {
throw new \RuntimeException(sprintf('The Git working tree has uncommitted changes, unable to checkout your working branch "%s"' . "\n" . 'Please resolve this failure manually.', $this->stashedBranch));
}
$this->checkout($this->stashedBranch);
$this->stashedBranch = null;
}