brew couldn't upgrade after upgrade xcode 7.3.1 to 8.1 I upgraded xcode from 7.3.1 to 8.1 and also I update homebrew using [brew update]. after that I could use [brew upgrade]. It shown the following warning message

Warning: You are using a pre-release version of Xcode.
   You may encounter build failures or other breakages.
   Please create pull-requests instead of filing issues.

I used [brew config] and it shown the following info

  HOMEBREW_VERSION: 1.0.8-54-g8019afb
  ORIGIN: https://github.com/Homebrew/brew.git
  HEAD: 8019afb60ad321b0f14f60b00c23d7fb098d35c2
  Last commit: 6 days ago
  Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
  Core tap HEAD: 83f73d73fac8229ac523bf839b8a5913de05bf08
  Core tap last commit: 3 hours ago
  HOMEBREW_PREFIX: /usr/local
  HOMEBREW_REPOSITORY: /usr/local/Homebrew
  HOMEBREW_CELLAR: /usr/local/Cellar
  HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
  CPU: quad-core 64-bit haswell
  Homebrew Ruby: 2.0.0-p648
  Clang: 8.0 build 800
  Git: 2.9.3 =&gt; /Applications/Xcode.app/Contents/Developer/usr/bin/git
  Perl: /usr/bin/perl
  Python: /usr/bin/python
  Ruby: /usr/local/bin/ruby =&gt; /usr/local/Cellar/ruby/2.3.1_2/bin/ruby
  Java: 1.8.0_25
  macOS: 10.11.6-x86_64
  Xcode: 8.1
  CLT: 7.3.1.0.1.1461711523


I think the last line of above info [CLT] means command line tools and its version is 7.3.1..., I think it should be 8.1 because Xcode is 8.1. How can I upgrade CLT from 7.3.1 to 8.1?
I had similar issue:

brew is not up-to-date even though running brew update returns:

Already up-to-date


Running brew upgrade returns:

Warning: You are using a pre-release version of Xcode.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.



I solved running the following command:
cd &quot;$(brew --repo)&quot; &amp;&amp; git fetch &amp;&amp; git reset --hard origin/master &amp;&amp; brew update --force