Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Homebrewをインストールしました。「brew --prefix」は /usr/local です。「brew update」と際限なく競合する、ローカルの Brew Git リポジトリの master ブランチに対して誤って実行してしまいました。ローカルの変更を破棄または無視したい。通常、私はただ rm -rf repo して再クローンしますが、 rm -rf /usr/local は賢明ではないと思います。
ローカルの Brew Git リポジトリを満足させるにはどうすればよいですか?
git reset --hard origin/masterすべてをメインの Homebrew Git リポジトリと同期させる必要があります。リポジトリで追跡されているファイルに加えたローカルの変更はすべて破棄されます。
git reset --hard origin/master