【React 报错】---Remove untracked files, stash or commit any changes, and try again.
在react项目中通过.less文件进行样式定义,先暴露webpack配置文件,执行命令:yarn eject 或 npm run eject,报错如下:

原因是因为工程默认的git 导致的(git配置文件)
解决办法:终端运行如下代码即可成功解决:
bash
git init
git add .
git commit -m ''暴露"
yarn eject