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

前端 未结 7 752
一生所求
一生所求 2021-01-31 00:49

Error

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

when i have updated from version 7 to Angular 8.

7条回答
  •  别跟我提以往
    2021-01-31 01:35

    I've had the same issue. It's a common bug in Angular 8. Simply you can use dirty commands to bypass the repo check, such as (if u really need to bypass this, follow force commands)

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

    but, I didn't do that. I followed following steps...

    first of all double check whether you are commited all the changes before the update.then keep a copy of the project to the same location and commit the copy also to the Git. then run following command from the original project directory

    ng update @angular/core@8 @angular/cli@8
    

    afterwards u can delete the copy. This worked for me! thank you!

提交回复
热议问题