react eject提示This git repository has untracked files or uncommitted changes:
在yarn eject 但时 老是提示This git repository has untracked files or uncommitted changes:
Remove untracked files, stash or commit any changes, and try again.
D:\react>yarn eject
yarn run v1.22.10
$ react-scripts eject
NOTE: Create React App 2+ supports TypeScript, Sass, CSS Modules and more without ejecting: https://reactjs.org/blog/2018/10/01/create-react-app-v2.html
√ Are you sure you want to eject? This action is permanent. ... yes
This git repository has untracked files or uncommitted changes:
package.json
M src/index.js
M yarn.lock
.eslintcache
src/pages/
Remove untracked files, stash or commit any changes, and try again.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
这时为什么呢,原因是在创建脚手架时添加了.gitgnore文件,但是却没有本地仓库,所以要初始化一个本地库。这样操作后,我们就可以看到如下运行成功的结果了:
git init
git add .
git commit -m 'init'
npm run eject 或者 yarn eject
这样就会看见执行成功了


好执行成功再看看

项目目录中已经多出来一个config 文件了这个就可以开始进行webpack配置了
react eject提示This git repository has untracked files or uncommitted changes:的更多相关文章
- npm run eject 命令后出现This git repository has untracked files or uncommitted changes错误
npm run eject 暴露隐藏的文件,不可逆 结果出现下面的问题 This git repository has untracked files or uncommitted changes: ...
- Git操作----删除untracked files
# 删除 untracked files git clean -f # 连 untracked 的目录也一起删掉 git clean -fd # 连 gitignore 的untrack 文件/目录也 ...
- 删除git库中untracked files(未监控)的文件
https://blog.csdn.net/ronnyjiang/article/details/53507306 在编译git库拉下来的代码时,往往会产生一些中间文件,这些文件我们根本不需要,尤其是 ...
- Git操作删除 untracked files
最近使用git 管理项目的时候,编译过程中出现了很多中间文件,今天发现使用 git clean 命令可以很方便进行清除: # 删除 untracked files git clean -f # 连 u ...
- linux git 报错提示 fatal: 'origin' does not appear to be a git repository 解决办法
输入: git pull origin master git报错提示 fatal: 'origin' does not appear to be a git repository fatal: Cou ...
- git 上传文件到仓库上提示:origin does not to be a git repository
最近上传代码到GitHub的时候,当我输入 git push -u origin master的时候,它提示: origin does not to be a git repository 在网上找到 ...
- git: fatal: Not a git repository (or any of the parent directories): .git
在看书 FlaskWeb开发:基于Python的Web应用开发实战 时,下载完源码后 git clone https://github.com/miguelgrinberg/flasky.git 试着 ...
- git 解决fatal: Not a git repository
我用git add file添加文件时出现这样错误: fatal: Not a git repository (or any of the parent directories): .git 提示说没 ...
- 把Git Repository建到U盘上去(转)
把Git Repository建到U盘上去 转 把Git Repository建到U盘上去 Git很火.原因有三: 它是大神Linus Torvalds的作品,天然地具备神二代的气质和品质: 促进了生 ...
- git错误:fatal: Not a git repository (or any of the parent directories): .git
git错误:fatal: Not a git repository (or any of the parent directories): .git 我用git add file添加文件时出现这样错误 ...
随机推荐
- Javaweb学习笔记第十五弹--Listente概述、AJAX、Axiox、JSON
Listener(监听器) 可以在application.session和request三个对象创建 Javaweb提供了8个监听器,其中较为典型的是ServletContextListener监听器 ...
- MySQL学习(六)timestamp & datetime 区别
参考博客: https://cloud.tencent.com/developer/article/1407693 timestamp只使用datetime一半的存储空间,并且会根据时区变化,具有特殊 ...
- Java8 lambda常用操作
参考博客:https://www.cnblogs.com/hmy-1365/p/12923435.html
- 关于 manacher 的一个小细节
在该算法中,我们需要用到一个数组 hw[i] ,代表 i 的最大回文半径.而且这个半径不包括 i 本身(若串为 ccc 则 hw 为 1). 这时最终答案为最大的 hw 减一. 为什么要减一呢?最终的 ...
- Python的安装与配置(图文教程)
安装Python 想要进行Python开发,首先需要下载和配置Python解释器. 下载Python 访问Python官网: https://www.python.org/ 点击downloads按钮 ...
- Teamcenter_NX集成开发:UF_UGMGR函数的使用
最近工作中经常使用Teamcenter.NX集成开发的情况,因此在这里记录UF_UGMGR函数的使用.使用UF_UGMGR相关函数需要有Teamcenter使用经验,理解Teamcenter中文件夹. ...
- vue对象深拷贝(避免对象赋值,改变一个对象的值,另一个对象也变化)
对象直接赋值时,例如 let b = { name: 'name', age: 12} let a=b, a.age = 13 console.log(b.age) // 13 由此可见,当改变 a ...
- Javascript 加密解密方法
本文链接 https://www.cnblogs.com/zichliang/p/17265960.html Javascript 和 我之前发的 python加密 以及 go加密 解密不一样 不需要 ...
- 案例: 利用 Hugging Face 进行复杂文本分类
Witty 与 Hugging Face 专家加速计划的成功案例 如果你对如何更快构建 ML 解决方案感兴趣,请访问 专家加速计划 登陆页面并通过 填写表单 联系我们! 业务背景 随着 IT 技术不断 ...
- argparser Python包使用
argparser Python包使用 导入 import argparse 定义parser对象(参数为介绍) parser = argparse.ArgumentParser('test pars ...