title: flutter upgrade command: Flutter fails to upgrade with exit code = 1
body: <p>I am trying to upgrade flutter to the latest version via Visual Studio code's terminal by running <code>flutter upgrade</code> command but every time I do it after a while I get the same error message over and over again!</p>
  <p>This is what I get:</p>
  <blockquote>
  <p>[flutter] flutter upgrade</p>
  <p>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 &quot;git stash&quot; or else commit the changes to a local branch. If it is okay to remove local changes, then re-run this command with --force.</p>
  <p>exit code 1</p>
  </blockquote>
  <p>I have already pushed the project to a <code>GitHub</code> repository but I don't seem to get what's going on here!</p>
  <p><strong>Q:</strong> How to properly upgrade flutter to the latest version?</p>