ng update-即使确实git commit都说“存储库不干净" [英] ng update --all does say 'Repository is not clean' evendought git commit

查看:273
本文介绍了ng update-即使确实git commit都说“存储库不干净"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用ng update来更新我的Angular,所有操作都如本问题所述[

I'm trying to update my Angular with ng update --all as in this question stated [can't find compiler ngcc module after upgrading Angular and project, but it always says Repository is not clean. Please commit or stash any changes before updating.

我今天已经运行了以下命令: npm安装 npm install -g @ angular/cli npm install-保存字体真棒角度字体真棒 npm install angular-alert-module --save

I have run the following commands today: npm install npm install -g @angular/cli npm install --save font-awesome angular-font-awesome npm install angular-alert-module --save

在这种状态下,程序已编译

At this state the programm compiled

ng更新@ angular/cli 从那以后它就不编译

ng update @angular/cli since then it does not compile

我读到我需要进行ng update --all --force,但由于存储库不干净"而无法正常工作.

I read I need to do ng update --all --force but it doesn't work because the repository 'is not clean'.

我提交了一个提交,然后将其推入并拉出(没有更改).但这没有帮助

I made a commit pushed it and pulled (where there were no changes) before. But it didn't help

ng更新--all --force

ng update --all --force

错误消息是:'存储库不干净.请先提交或存储任何更改,然后再进行更新.'

The error-message is: 'Repository is not clean. Please commit or stash any changes before updating.'

推荐答案

如果要绕过该警告,则应使用--allow-dirty.

You should use --allow-dirty if you want to bypass that warning.

这适用于@ angular/cli v8.0.1 +.

This works on @angular/cli v8.0.1+.

ng update --all --allow-dirty

这篇关于ng update-即使确实git commit都说“存储库不干净"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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