存储库不干净.在 Angular 8 中更新之前,请提交或隐藏任何更改 [英] Repository is not clean. Please commit or stash any changes before updating In Angular 8

查看:36
本文介绍了存储库不干净.在 Angular 8 中更新之前,请提交或隐藏任何更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误

<块引用>

存储库不干净.请在更新前提交或隐藏任何更改

当我从版本 7 更新到 Angular 8 时.

Angular 升级指南 https://update.angular.io/#7.0:8.0

 D:\app-test>ng 更新 @angular/cli @angular/corenpm 缓存验证

<块引用>

存储库不干净.请在更新前提交或隐藏任何更改.

更新版本

 PS D:\app-test>更新使用包管理器:'npm'正在收集已安装的依赖项...找到 58 个依赖项.我们分析了你的 package.json,有一些包需要更新:要更新的名称版本命令--------------------------------------------------------------------------------@angular/cdk 7.2.2 ->8.0.1 ng 更新@angular/cdk@angular/core 7.2.15 ->8.0.1 ng 更新@angular/core@angular/core 7.2.2 ->7.2.15 ng 更新@angular/core@角度/材料 7.3.7 ->8.0.1 ng 更新@angular/materialrxjs 6.3.3 ->6.5.2 ng 更新 rxjs可能还有其他软件包已过时.运行ng update --all"以尝试同时更新所有内容.PS D:\app-test>ng更新@angular/cdk存储库不干净.请在更新前提交或隐藏任何更改.

我已经检查过 git 没有安装在项目中.

有效的解决方案

 git commit

谷歌搜索后,我发现这是在 Angular 8 之后发生的.

错误

https://github.com/angular/angular-cli/issues/14600

解决方案

这是 Angular 8 中的一个错误

您可以使用以下方法解决它:

ng update @angular/cli @angular/core --allow-dirty

Error

Repository is not clean. Please commit or stash any changes before updating

when i have updated from version 7 to Angular 8.

Angular Guide for upgrade https://update.angular.io/#7.0:8.0

  D:\app-test> ng update @angular/cli @angular/core
               npm cache verify

Repository is not clean. Please commit or stash any changes before updating.

Update Version

    PS D:\app-test> ng update
                Using package manager: 'npm'
                Collecting installed dependencies...
                Found 58 dependencies.
                    We analyzed your package.json, there are some packages to update:

                      Name                               Version                  Command to update
                     --------------------------------------------------------------------------------
                      @angular/cdk                       7.2.2 -> 8.0.1           ng update @angular/cdk
                      @angular/core                      7.2.15 -> 8.0.1          ng update @angular/core
                      @angular/core                      7.2.2 -> 7.2.15          ng update @angular/core
                      @angular/material                  7.3.7 -> 8.0.1           ng update @angular/material
                      rxjs                               6.3.3 -> 6.5.2           ng update rxjs


                    There might be additional packages that are outdated.
                    Run "ng update --all" to try to update all at the same time.

                PS D:\app-test> ng update @angular/cdk
                Repository is not clean.  Please commit or stash any changes before updating.

i have checked git was not installed in project.

solution that worked

   git commit 

After Googling i have This is happening After Angular 8.

Bug

https://github.com/angular/angular-cli/issues/14600

解决方案

It's a bug in Angular 8

you can work around it by using:

ng update @angular/cli @angular/core --allow-dirty

这篇关于存储库不干净.在 Angular 8 中更新之前,请提交或隐藏任何更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆