当我尝试执行git commit时,此消息会显示在控制台中,并且不会让我提交。
[2018-09-10 07:39:36] local.ERROR: There are no commands defined in the "code" namespace. {"exception":"[object] (Symfony\\Component\\Console\\Exception\\CommandNotFoundException(code: 0): There are no commands defined in the \"code\" namespace. at /var/www/html/MapadoCarro/new-plataform/vendor/symfony/console/Application.php:564)
[stacktrace]
#0 /var/www/html/MapadoCarro/new-plataform/vendor/symfony/console/Application.php(604): Symfony\\Component\\Console\\Application->findNamespace('code')
#1 /var/www/html/MapadoCarro/new-plataform/vendor/symfony/console/Application.php(229): Symfony\\Component\\Console\\Application->find('code:lint')
#2 /var/www/html/MapadoCarro/new-plataform/vendor/symfony/console/Application.php(148): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#3 /var/www/html/MapadoCarro/new-plataform/vendor/laravel/framework/src/Illuminate/Console/Application.php(88): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#4 /var/www/html/MapadoCarro/new-plataform/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(121): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#5 /var/www/html/MapadoCarro/new-plataform/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#6 {main}
"}
该项目正在正常运行,我只是无法提交。
答案 0 :(得分:1)
您是否设置了运行php单元测试并由于配置错误而显示这些错误的预提交挂钩?看看your-project/.git/hooks/
,看看是否存在pre-commit
文件。
有关git hook的更多信息,请参见official git-hooks docs here。