Error
Repository is not clean. Please commit or stash any changes before updating
when i have updated from version 7 to Angular 8.
I faced the same issue, I resolved using the below command
git stash save --include-untracked
First, Check if there are any changes in your code that haven't pushed to git if yes push them, then close the old instance(cmd) and open a new instance of cmd then run the command. This worked for me, Thanks
I have problem commit and I did the commit all
.
ng update @angular/core @angular/cli
It's a bug in Angular 8
you can work around it by using:
ng update @angular/cli @angular/core --allow-dirty
in my case, this was due to a node_modules folder not being excluded by the .gitignore. once added, this error no longer appeared
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!