React报错:Remove untracked files, stash or commit any changes, and try again.

Posted lfw421935678

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了React报错:Remove untracked files, stash or commit any changes, and try again.相关的知识,希望对你有一定的参考价值。

想在react项目中暴露webpack配置文件,命令行即:yarn eject 或 npm run eject,结果报了一个以前没有出现过的错误:Remove untracked files, stash or commit any changes, and try again.如下图:

技术图片

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

查了下资料,发现是git地址的问题,输入下面命令行就行了:

1 git add .
2 git commit -am "Save before ejecting"
3 npm run eject

命令结束后出现Ejected successfully!即暴露webpack配置文件成功。

以上是关于React报错:Remove untracked files, stash or commit any changes, and try again.的主要内容,如果未能解决你的问题,请参考以下文章

git报错-Initial commit Untracked files nothing added to commit but untracked

GitGit使用记录: 基于git ignore文件将remote上的文件untrack

nothing added to commit but untracked files present (use“git add“to track)

[React] Remove React PropTypes by using Flow Annotations (in CRA)

删除Git的untracked files

git push 出现untracked content