I recently decided to run flutter upgrade, but after starting, the command terminal states:
Your flutter checkout has local changes that would be erased by upgrading. If you want to keep these changes, it is recommended that you stash them via "git stash" or else commit the changes to a local branch. If it is okay to remove local changes, then re-run this command with "--force".
I don't know what it means by "local changes." I'm not very familiar with git and do not generally need to mess with it explicitly. I'm concerned that I'm going to mess something up if use "--force."
Is there a way I can check what these changes are/were first? It's probably some local configuration change that I forgot about.
A slightly more complete answer, so that you can see what changes have actually been made to your local flutter environment:
cd ~/development/flutter #or wherever you installed flutter
git diff HEAD
In my case, git reminded me that I had added '--disable-web-security'
to packages/flutter_tools/lib/src/web/chrome.dart
which is what I suspect will be a very common local change.
git stash #if you like, or just remember your changes
flutter upgrade --force #to upgrade flutter
Now you can put your local changes back, assuming you still want them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With