brew update failure while executing git checkout

后端 未结 5 1686
青春惊慌失措
青春惊慌失措 2021-01-30 07:07

After an interrupted brew update because of a network issue, Homebrew appears to be broken:

$ brew update
error: pathspec \'master\' did not match a         


        
5条回答
  •  臣服心动
    2021-01-30 07:40

    Fixed with the following commands:

    $ cd `brew --prefix`
    $ git remote add origin https://github.com/Homebrew/homebrew.git
    $ git fetch origin
    $ git reset --hard origin/master
    $ brew update
    Already up-to-date.
    

提交回复
热议问题