Composer安装依赖后Git操作遇目录删除标记及换行符转换警告的解决方法求助
Composer安装依赖后Git操作遇目录删除标记及换行符转换警告的解决方法求助
我执行了composer require logger命令,安装过程看起来是正常的:

但之后我运行git status查看状态,却得到了这样的结果:
On branch master Changes to be committed: (use "git restore --staged <file>..." to unstage) deleted: my_project_directory Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: composer.json modified: composer.lock modified: config/bundles.php modified: symfony.lock
接着我尝试执行这个添加文件的命令:git add composer.json composer.lock config/bundles.php symfony.lock config/packages/monolog.yaml
结果又弹出了一堆换行符转换的警告:
warning: in the working copy of 'composer.json', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'composer.lock', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'config/bundles.php', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'symfony.lock', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'config/packages/monolog.yaml', LF will be replaced by CRLF the next time Git touches it
有没有大佬能告诉我该怎么解决这两个问题呀?
备注:内容来源于stack exchange,提问作者Marouane Sadoune
相关产品推荐
相关产品推荐

