Skip to content

Instantly share code, notes, and snippets.

@marmot1123
Last active August 29, 2015 14:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marmot1123/a7ac81ee8108a6d5ccf2 to your computer and use it in GitHub Desktop.
Save marmot1123/a7ac81ee8108a6d5ccf2 to your computer and use it in GitHub Desktop.
When brew update error occur because of git, this shell script deal with the error and brew update automatically.
#!/bin/sh
cd $(brew --prefix)
sudo git fetch origin
sudo git reset --hard origin/master
brew update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment