Flutter upgrade fail

Below worked with me to get 1.0.0-stable:

$ git clean -xfd
$ git checkout origin/stable
$ git pull
$ flutter doctor
$ flutter --version
Flutter 1.0.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 5391447fae (5 days ago) • 2018-11-29 19:41:26 -0800
Engine • revision 7375a0f414
Tools • Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

In the Flutter install directory please run

git clean -xfd
git stash save --keep-index
git stash drop
git pull
flutter doctor

I had the same problem and git reset --hard origin/beta in the flutter home directory fixed it. In my case git status revealed that "You have unmerged paths."

Note that for the stable branch you need this:

cd $FLUTTER_HOME    
git reset --hard origin/stable

Go to your flutter home directory and do git checkout . or git reset head --hard

Tags:

Flutter