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>'); } }
protected function run(\DialoGit\Dialoger $dialoger) { $header = $dialoger->dialogInput('New commit header:'); $dialoger->runGit('commit -m "' . $header . '"'); }
protected function run(\DialoGit\Dialoger $dialoger) { $url = $dialoger->dialogInput('URL to clone:'); $dialoger->runGitOnNewShell('clone ' . $url); }
protected function run(\DialoGit\Dialoger $dialoger) { $name = $dialoger->dialogInput('New remote repository name:'); $url = $dialoger->dialogInput('New remote repository URL:'); $dialoger->runGit('remote add ' . $name . ' ' . $url); }
protected function run(\DialoGit\Dialoger $dialoger) { $message = $dialoger->dialogInput('New stash message:'); $dialoger->runGit('stash save "' . $message . '"'); }
protected function run(\DialoGit\Dialoger $dialoger) { $name = $dialoger->dialogInput('New tag name:'); $message = $dialoger->dialogInput('New tag message:'); $dialoger->runGit('tag -m "' . $message . '" "' . $name . '"'); }