سؤال
While trying to install FreeTDS via Homebrew, I ran brew edit freetds
. I edited the file. I'd like to restore the Recipe file (freetds.rb) to it's orinal state in case I introduced a typo into it.
Is there a way to reset a brew formula file?
Thanks
المحلول
Homebrew recipes are managed via Git, so you can just git checkout freetds.rb
to wipe out your local changes.
نصائح أخرى
You need to reset your Cellar git repo.
cd `brew --cellar`
git reset --hard HEAD
brew upgrade <formula>
That should do it!
For Homebrew version 2.1.4 on macOS Mojave the following command will work for core formulas:
git -C $(brew --repo)/Library/Taps/homebrew/homebrew-core checkout Formula/$FORMULA_NAME.rb
Where $FORMULA_NAME
is the name of the formula you have edited.
لا تنتمي إلى StackOverflow