Gush\Helper\GitHelper::restoreStashedBranch PHP 메소드

restoreStashedBranch() 공개 메소드

Tries to restore back to the original branch the user was in (before executing any command).
    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;
    }

Usage Example

예제 #1
0
 public function restoreStashedBranch()
 {
     $this->gitHelper->restoreStashedBranch();
 }