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

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

问题描述

错误

存储库不干净.请先提交或存储任何更改,然后再更新

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

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

when i have updated from version 7 to Angular 8.

升级角度指南 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.

更新版本

    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.

我已检查git是否未安装在项目中.

i have checked git was not installed in project.

有效的解决方案

   git commit 

在谷歌搜索之后,我正在Angular 8之后发生这种情况.

After Googling i have This is happening After Angular 8.

错误

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

推荐答案

这是Angular 8中的错误

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天全站免登陆