在根目录创建一个 .gitattributes 文件然后按照下面的格式写上,然后推到 git 再安装/.gitattributes export-ignore /.git export-ignore /.gitignore export-ignore参考:GitAttributes for PHP Composer Projects • PHP.Watch
使用 composer require
--prefer-dist
安装你这个安装是composer使用git命令克隆下来的, 所以有.git文件夹