简体   繁体   English

尝试在 OSX 上安装 ifuse 时,我在 vi 中错误地更改了文件,但不知道如何取回原始文件

[英]I changed a file incorrectly in vi when trying to install ifuse on OSX and don't know how to get the original back

I'm very inexperienced, and was following directions here ---我非常缺乏经验,并且在这里按照指示进行操作---

Installing ifuse with Homebrew results in ERROR message 使用 Homebrew 安装 ifuse 会导致错误消息

I believe I made some unintended changes when I was editing the file in我相信我在编辑文件时做了一些意外的更改

$ vi `brew formula ifuse`

without understanding what I was doing.不明白我在做什么。 When I went to install ifuse, it just give me an error.当我去安装ifuse时,它只是给我一个错误。 Is there any way to get back to the original file/undo my edits?有什么方法可以返回原始文件/撤消我的编辑?

Homebrew formulas are in a local git repository.自制公式位于本地 git 存储库中。 You can restore the original formula by typing:您可以通过键入以下内容来恢复原始公式:

cd `brew --prefix`/Library/Taps/homebrew/homebrew-core/Formula
git checkout ifuse.rb

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM