Пример #1
0
 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>');
     }
 }