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

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


It's a bug in Angular 8

you can work around it by using:

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


I have tried using mention command for upgrading from angular 8 to angular 9, but was still getting the error.

Then i have tried same command with --force flag and it worked for me.

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


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 orng 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!