Class'Magento\Setup\Application'未找到,执行后"git reset --hard"

Class 'Magento\Setup\Application' not found, after executing "git reset --hard"

我执行了git reset --hard,但现在我得到:

PHP Fatal error:  Uncaught Error: Class 'Magento\Setup\Application' not found in /home/xy/vendor/magento/framework/Console/Cli.php:79
Stack trace:
#0 /home/xy/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI')
#1 {main}
  thrown in /home/xy/vendor/magento/framework/Console/Cli.php on line 79

我执行了 composer update 希望这能修复它,但它没有。我该如何解决?

原来 git reset --hard 出于不明原因破坏了我的 setup 文件夹,甚至 git pull 都没有修复它。

所以我不得不从另一个项目复制文件夹。现在可以了。

我刚刚 运行 git reset --hard 又解决了这个问题。