Stable channel から Beta channel に切り替えようとするとエラー。
$ flutter channel beta
Switching to flutter channel 'beta'...
git: fatal: 'origin/beta' is not a commit and a branch 'beta' cannot be created from it
Switching channels failed with error code 128.
最初に stable ブランチだけを指定して clone したために、ブランチ切替えに失敗しているらしい。
$ git clone https://github.com/flutter/flutter.git -b stable --depth 1
flutter/.git/config
に明示的に fetch 先を追加してやればエラーが消えた。
[remote "origin"]
url = https://github.com/flutter/flutter.git
fetch = +refs/heads/stable:refs/remotes/origin/stable
+ fetch = +refs/heads/beta:refs/remotes/origin/beta
参考: https://qiita.com/kinpira/items/55a20ea5fb175e7529fa
参考: https://stackoverflow.com/questions/23986685/pull-updates-with-git-after-cloned-with-depth-1/