diff --git a/src/NewCommand.php b/src/NewCommand.php index 3c33cf9e..f7fb552c 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -107,8 +107,8 @@ protected function interact(InputInterface $input, OutputInterface $output) ) === 'Pest'); } - if (! $input->getOption('git') && Process::fromShellCommandline('git --version')->run() === 0) { - $input->setOption('git', confirm(label: 'Would you like to initialize a Git repository?')); + if (! $input->getOption('git') && $input->getOption('github') === false && Process::fromShellCommandline('git --version')->run() === 0) { + $input->setOption('git', confirm(label: 'Would you like to initialize a Git repository?', default: false)); } }