在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:的更多相关文章

  1. npm run eject 命令后出现This git repository has untracked files or uncommitted changes错误

    npm run eject 暴露隐藏的文件,不可逆 结果出现下面的问题 This git repository has untracked files or uncommitted changes: ...

  2. Git操作----删除untracked files

    # 删除 untracked files git clean -f # 连 untracked 的目录也一起删掉 git clean -fd # 连 gitignore 的untrack 文件/目录也 ...

  3. 删除git库中untracked files(未监控)的文件

    https://blog.csdn.net/ronnyjiang/article/details/53507306 在编译git库拉下来的代码时,往往会产生一些中间文件,这些文件我们根本不需要,尤其是 ...

  4. Git操作删除 untracked files

    最近使用git 管理项目的时候,编译过程中出现了很多中间文件,今天发现使用 git clean 命令可以很方便进行清除: # 删除 untracked files git clean -f # 连 u ...

  5. 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 ...

  6. git 上传文件到仓库上提示:origin does not to be a git repository

    最近上传代码到GitHub的时候,当我输入 git push -u origin master的时候,它提示: origin does not to be a git repository 在网上找到 ...

  7. git: fatal: Not a git repository (or any of the parent directories): .git

    在看书 FlaskWeb开发:基于Python的Web应用开发实战 时,下载完源码后 git clone https://github.com/miguelgrinberg/flasky.git 试着 ...

  8. git 解决fatal: Not a git repository

    我用git add file添加文件时出现这样错误: fatal: Not a git repository (or any of the parent directories): .git 提示说没 ...

  9. 把Git Repository建到U盘上去(转)

    把Git Repository建到U盘上去 转 把Git Repository建到U盘上去 Git很火.原因有三: 它是大神Linus Torvalds的作品,天然地具备神二代的气质和品质: 促进了生 ...

  10. 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添加文件时出现这样错误 ...

随机推荐

  1. python爬取今日的bing壁纸

    #!/usr/bin/python #你要的文件夹是 E://pics// ps:没有的话帮你建一个 import requests import os from datetime import da ...

  2. SpringBoot——静态资源及原理

    一.使用 SpringBoot 的步骤 [1]创建 SpringBoot应用,选中自己需要的模块.[2]SpringBoot 已经默认将这些场景配置好,只需要在配置文件中指定少量配置就可以运行起来.[ ...

  3. Flink 1.0 ProgramInvocationException: Job failed ConnectException: 拒绝连接 (Connection refused)

    [问题描述]:[root@hadoop1 flink-1.10.1]# bin/flink run examples/streaming/SocketWindowWordCount.jar  --po ...

  4. FutureTask 类

    更多内容,前往IT-BLOG 一.什么是 Future和 FutureTask FutureTask 的 Future就源自于它的异步工作机制,如果我们在主线程中直接写一个函数来执行任务,这是同步的任 ...

  5. Mysql 事务隔离级别和锁的关系

    我们都知道事务的几种性质,数据库为了维护这些性质,尤其是一致性和隔离性,一般使用加锁这种方式.同时数据库又是个高并发的应用,同一时间会有大量的并发访问,如果加锁过度,会极大的降低并发处理能力.所以对于 ...

  6. rocketmq-spring : 实战与源码解析一网打尽

    RocketMQ 是大家耳熟能详的消息队列,开源项目 rocketmq-spring 可以帮助开发者在 Spring Boot 项目中快速整合 RocketMQ. 这篇文章会介绍 Spring Boo ...

  7. Defi开发简介

    Defi开发简介 介绍 Defi是去中心化金融的缩写, 是一项旨在利用区块链技术和智能合约创建更加开放,可访问和透明的金融体系的运动. 这与传统金融形成鲜明对比,传统金融通常由少数大型银行和金融机构控 ...

  8. [Java EE]Spring Boot 与 Spring Cloud的关系/过去-现在-未来

    1 微服务架构 定义 微服务 (Microservices) 是一种软件架构风格, 它是以专注于单一责任与功能的小型功能区块 (Small Building Blocks) 为基础, 利用模块化的方式 ...

  9. Dapr和Rainbond集成,实现云原生BaaS和模块化微服务开发

    背景 Dapr 是一个开源的分布式应用运行时,帮助开发者构建松耦合的分布式应用程序,具有良好的可扩展性和可维护性.Rainbond 是一款企业级的云原生应用管理平台,提供了丰富的功能和工具,方便开发者 ...

  10. Redis 数据类型 String

    Redis 数据类型 String Redis主要支持的数据类型有5种:String ,Hash ,List ,Set ,和 Sorted Set Redis 常用命令,思维导图 >>&g ...