protected function run(\DialoGit\Dialoger $dialoger) { $picker = new \DialoGit\Picker\Tag($dialoger); $tag = $picker->pickOne('Pick one tag to <b>checkout</b>:'); $dialoger->runGit('checkout ' . $tag); $dialoger->dialogInfo('HEAD is now on tag <b>' . $tag . '</b>'); }
protected function run(\DialoGit\Dialoger $dialoger) { $picker = new \DialoGit\Picker\Branch($dialoger); $currentBranch = $picker->getCurrent(); $branch = $picker->pickOneBut('HEAD is on <b>' . $currentBranch . '</b>\\n\\nPick one branch to <b>checkout</b>:', $currentBranch); $dialoger->runGit('checkout ' . $branch); $dialoger->dialogInfo('HEAD is now on branch <b>' . $branch . '</b>'); }
protected function run(\DialoGit\Dialoger $dialoger) { $newBranch = $dialoger->dialogInput('New branch name:'); $picker = new \DialoGit\Picker\Branch($dialoger); $currentBranch = $picker->getCurrent(); $dialoger->runGit('branch ' . $newBranch); if ($dialoger->dialogQuestion('HEAD is on <b>' . $currentBranch . '</b>\\n\\nDo you want to checkout the new branch now?')) { $dialoger->runGit('checkout ' . $newBranch); $dialoger->dialogInfo('HEAD is now on branch <b>' . $newBranch . '</b>'); } }