public function handle()
 {
     $projects = [];
     $choices = [];
     foreach ($this->factory->getProjects() as $project) {
         if ($project->config('enable_git_hook', false) === true) {
             $projects[] = $project;
             $choices[] = $project->getName();
         }
     }
     $project = $this->choice('Pick the git enabled project you wish to sync', $choices);
     if ($this->option('queue')) {
         app('codex.hooks.git')->createSyncJob($project);
         $this->comment('Created sync job and pushed it onto the queue.');
     } else {
         $this->comment('Starting synchronisation. This might take a while.');
         app('codex.hooks.git')->gitSyncer($this->factory->getProject($project))->syncAll();
     }
 }