Homebrew: fatal: Needed a single revision

Homebrew: fatal: Needed a single revision

$ brew update
Checking out v1.0.1 in /usr/local/Homebrew...
To checkout master in /usr/local/Homebrew run:
  'cd /usr/local/Homebrew && git checkout master
Checking out v1.0.1 in /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask...
To checkout master in /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask run:
  'cd /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask && git checkout master
fatal: Cannot update paths and switch to branch 'v1.0.1' at the same time.
Did you intend to checkout 'refs/tags/1.0.1' which can not be resolved as commit?
fatal: Needed a single revision
invalid upstream refs/tags/1.0.1
Checking out v1.0.1 in /usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions...
To checkout master in /usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions run:
  'cd /usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions && git checkout master
fatal: Cannot update paths and switch to branch 'v1.0.1' at the same time.
Did you intend to checkout 'refs/tags/1.0.1' which can not be resolved as commit?
fatal: Needed a single revision
invalid upstream refs/tags/1.0.1
Checking out v1.0.1 in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
To checkout master in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core run:
  'cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core && git checkout master
fatal: Cannot update paths and switch to branch 'v1.0.1' at the same time.
Did you intend to checkout 'refs/tags/1.0.1' which can not be resolved as commit?
fatal: Needed a single revision
invalid upstream refs/tags/1.0.1
Checking out v1.0.1 in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-dupes...
To checkout master in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-dupes run:
  'cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-dupes && git checkout master
fatal: Cannot update paths and switch to branch 'v1.0.1' at the same time.
Did you intend to checkout 'refs/tags/1.0.1' which can not be resolved as commit?
fatal: Needed a single revision
invalid upstream refs/tags/1.0.1
Already up-to-date.

Solution: cd $(brew --repository) && git fetch && git reset --hard origin/master

Source

Leave a Reply

Your email address will not be published. Required fields are marked *