protected function removeFromGitIgnore()
 {
     $fileName = $this->_magentoRootFolder . '/.gitignore';
     if ($content = FileSystem::readfile($fileName)) {
         $existingPaths = array_map('trim', explode("\n", $content));
         $newPaths = [];
         foreach ($existingPaths as $existingPath) {
             if (!in_array($existingPath, $this->pathsForGitIgnore)) {
                 $newPaths[] = $existingPath;
             }
         }
         FileSystem::filewrite($fileName, implode("\n", $newPaths), 'w', false);
     }
 }
 protected function saveTemplate($name, $content)
 {
     $paths = $this->getApplicationPaths();
     $file = new FileSystem();
     if (isset($paths[$name])) {
         $fileExists = file_exists($paths[$name]);
         if (!$fileExists) {
             $file->filewrite($paths[$name], $content);
         } elseif ($this->getInput()->getOption('force')) {
             $file->filewrite($paths[$name], $content);
         }
     } else {
         throw new \Exception('Path for \'' . $name . '\' not found');
     }
 }