While installing homebrew I got the following message:
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 3725, done.
remote: Compressing objects: 100% (3617/3617), done.
remote: Total 3725 (delta 15), reused 1250 (delta 0), pack-reused 0
Receiving objects: 100% (3725/3725), 2.91 MiB | 2.22 MiB/s, done.
Resolving deltas: 100% (15/15), done.
Checking connectivity... done.
Tapped 3604 formulae (3,752 files, 9M)
Checking out v1.0.0 in /usr/local/Homebrew...
To checkout master in /usr/local/Homebrew run:
'cd /usr/local/Homebrew && git checkout master
Checking out v1.0.0 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.0' at the same time.
Did you intend to checkout 'refs/tags/1.0.0' which can not be resolved as commit?
fatal: Needed a single revision
invalid upstream refs/tags/1.0.0
Already up-to-date.
Everything seems to be working, though.
Is this behaviour kind of intended?
I'm seeing a similar issue here (OS X 10.11.6). I've been using homebrew for a while, and this morning did a brew update without incident:
$ brew update
Updated Homebrew from a148aa3 to f6fef7c.
Updated 3 taps (caskroom/cask, homebrew/core, homebrew/science).
Now when I do a brew update I get this message:
Checking out v1.0.0 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.0' at the same time.
Did you intend to checkout 'refs/tags/1.0.0' which can not be resolved as commit?
fatal: Needed a single revision
invalid upstream refs/tags/1.0.0
Already up-to-date.
@dfannius Yes, also during update. I actually tried to reinstall brew, because I thought that might be an issue.
P.S. I am using macOS Sierra 10.12
Thanks for the report! Can you both try brew update, see if that fixes it and if not run brew update again, see if that fixes it and if not run brew update --force and see if that fixes it and then post in this issue with what commands you had to run to get this to work. Thanks!
@MikeMcQuaid
Installation now gives
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 3725, done.
remote: Compressing objects: 100% (3617/3617), done.
remote: Total 3725 (delta 15), reused 1250 (delta 0), pack-reused 0
Receiving objects: 100% (3725/3725), 2.91 MiB | 2.11 MiB/s, done.
Resolving deltas: 100% (15/15), done.
Checking connectivity... done.
Tapped 3604 formulae (3,752 files, 9M)
Checking out v1.0.0 in /usr/local/Homebrew...
To checkout master in /usr/local/Homebrew run:
'cd /usr/local/Homebrew && git checkout master
Already up-to-date.
Is this
To checkout master in /usr/local/Homebrew run:
'cd /usr/local/Homebrew && git checkout master
Intended, by the way?
brew update and brew update --force both still fail. brew update still produces the same output as my first comment here, while brew update --force produces six copies of it, one for each tap (homebrew-cask, homebrew-core, etc.).
@dfannius @kjhealy last thing to try: git tag 1.0.1 origin/master && brew update --force; git tag -d 1.0.1. Make sure to run the git tag -d 1.0.1 at the end or Bad Things Will Happen.
@MikeMcQuaid The fix provided in the Readme.md seems to have cleared things up for me, with git reporting v1.0.0 at the end of that process.
I've tagged 1.0.1 which should address this with a brew update (or two). Please let me know in here if it takes two or if that still isn't enough (in which case try brew update --force and then post in here).
@MikeMcQuaid brew update (two) and brew update --force it's not work
brew update
Checking out v1.0.0 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.0' at the same time.
Did you intend to checkout 'refs/tags/1.0.0' which can not be resolved as commit?
fatal: Needed a single revision
invalid upstream refs/tags/1.0.0
Checking out v1.0.0 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.0' at the same time.
Did you intend to checkout 'refs/tags/1.0.0' which can not be resolved as commit?
fatal: Needed a single revision
invalid upstream refs/tags/1.0.0
Already up-to-date.
โ local brew --version
Homebrew 1.0.0 (git revision a381b; last commit 2016-09-21)
Homebrew/homebrew-core (git revision 0fad; last commit 2016-09-21)
@dezon Run brew update --force multiple times (like 4-5x) and see if if it eventually works.
@MikeMcQuaid updated to 1.0.1
โ local brew --version
Homebrew 1.0.0 (git revision a381b; last commit 2016-09-21)
Homebrew/homebrew-core (git revision 0fad; last commit 2016-09-21)
โ local brew update --force
Checking out v1.0.1 in /usr/local/Homebrew...
To checkout v1.0.1 in /usr/local/Homebrew run:
'cd /usr/local/Homebrew && git checkout v1.0.1
Updated 2 taps (caskroom/cask, homebrew/core).
==> Updated Formulae
aws-sdk-cpp global ipfs offlineimap sonar-runner
fzf gupnp khard reposurgeon
โ local brew update --force
Checking out v1.0.1 in /usr/local/Homebrew...
To checkout v1.0.1 in /usr/local/Homebrew run:
'cd /usr/local/Homebrew && git checkout v1.0.1
Already up-to-date.
@dezon Glad it's working. It seems the first time it'll print some unhelpful messages but still update and the second time everything will be fine. Thanks all!
@MikeMcQuaid thank you for quick reaction!
Is
To checkout v1.0.1 in /usr/local/Homebrew run:
'cd /usr/local/Homebrew && git checkout v1.0.1
How it should work now?
@omtcyfz You can either git checkout v1.0.1 or just leave brew update and it'll handle it correctly either way.
I had this too but I think the 1.01 tagging fixed it:
leewalsh@warbler /usr/l/Homebrew (v1.0.0|โ)> brew update
Checking out v1.0.1 in /usr/local/Homebrew...
To checkout v1.0.0 in /usr/local/Homebrew run:
'cd /usr/local/Homebrew && git checkout v1.0.0
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
Updated Homebrew from d5b6ecf to a381b59.
No changes to formulae.
leewalsh@warbler /usr/l/Homebrew (v1.0.1|โ)> brew update
Updated 1 tap (caskroom/cask).
No changes to formulae.
_edit_ Oops I see this is now closed. Thanks!
Yep, basically it'll complain the first time as it tries to look for a tag on all repositories and then afterwards it'll be all ๐. The weird complaints the first time will not cause any issues beyond ๐ people.
@MikeMcQuaid aha, I see. Thank you very much!
@MikeMcQuaid I got same error with 1.0, then run brew update multiple times and got same errors (1.0.1 have already released). Then I try brew update --force and git checkout 1.0.1.
So now I have:
brew update -> Already up-to-date.
git status -> On branch v1.0.1,
brew update --force ->
Checking out v1.0.1 in /usr/local/Homebrew...
To checkout v1.0.1 in /usr/local/Homebrew run:
'cd /usr/local/Homebrew && git checkout v1.0.1
Already up-to-date.
brew --version ->
Homebrew 1.0.0 (git revision a381b; last commit 2016-09-21)
Homebrew/homebrew-core (git revision 6e220; last commit 2016-09-21)
I just report, this isn't a problem, big thanks for 1.0.
I've tried all the things listed here and brew --version still reports 1.0.0, even after doing git checkout v1.0.1
Mine too @jtsom, though that is not this issue.
leewalsh@warbler ~> cd (brew --repo)
leewalsh@warbler /usr/local/Homebrew (v1.0.1|โ)> git status
On branch v1.0.1
nothing to commit, working tree clean
leewalsh@warbler /usr/local/Homebrew (v1.0.1|โ)> brew --version
Homebrew 1.0.0 (git revision a381b; last commit 2016-09-21)
Homebrew/homebrew-core (git revision 48e0; last commit 2016-09-21)
@MikeMcQuaid needed a version update in Library/Homebrew/brew.sh for MR #1060
@MikeMcQuaid needed a version update in Library/Homebrew/brew.sh for MR #1060
Yep, exactly. Apologies folks: the messaging/versioning is confusing but we will fix it for the next release. If you are on 1.0.1 it will still say 1.0.0: sorry about that.
Running into this issue also:
brew update
fatal: Cannot update paths and switch to branch 'v1.1.4' at the same time.
Did you intend to checkout 'refs/tags/1.1.4' which can not be resolved as commit?
fatal: Needed a single revision
invalid upstream refs/tags/1.1.4
Already up-to-date.
brew update --force
fatal: Cannot update paths and switch to branch 'v1.1.4' at the same time.
Did you intend to checkout 'refs/tags/1.1.4' which can not be resolved as commit?
fatal: Needed a single revision
invalid upstream refs/tags/1.1.4
Already up-to-date.
brew -v update
Checking if we need to fetch /home/timothee/.linuxbrew...
Checking if we need to fetch /home/timothee/.linuxbrew/Library/Taps/grpc/homebrew-grpc...
Checking if we need to fetch /home/timothee/.linuxbrew/Library/Taps/homebrew/homebrew-core...
Checking if we need to fetch /home/timothee/.linuxbrew/Library/Taps/homebrew/homebrew-dupes...
Checking if we need to fetch /home/timothee/.linuxbrew/Library/Taps/homebrew/homebrew-emacs...
Checking if we need to fetch /home/timothee/.linuxbrew/Library/Taps/homebrew/homebrew-python...
Checking if we need to fetch /home/timothee/.linuxbrew/Library/Taps/homebrew/homebrew-science...
Checking if we need to fetch /home/timothee/.linuxbrew/Library/Taps/homebrew/homebrew-x11...
Checking if we need to fetch /home/timothee/.linuxbrew/Library/Taps/linuxbrew/homebrew-xorg...
Updating /home/timothee/.linuxbrew...
fatal: Cannot update paths and switch to branch 'v1.1.4' at the same time.
Did you intend to checkout 'refs/tags/1.1.4' which can not be resolved as commit?
fatal: Needed a single revision
invalid upstream refs/tags/1.1.4
please advise
@timotheecour Don't report Linuxbrew issues here, please.
Most helpful comment
Yep, exactly. Apologies folks: the messaging/versioning is confusing but we will fix it for the next release. If you are on 1.0.1 it will still say 1.0.0: sorry about that.