
brew 更新的时候,提示是这个:
Ignoring path homebrew-cask/ To restore the stashed changes to /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask run: 'cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask && git stash pop' Updated 2 taps (homebrew/core and homebrew/ask). ==> Updated Formulae 我一看,提示的还挺详细,那么就继续呗:
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask && git stash pop Already up to date! On branch master Your branch is up to date with 'origin/master'. Untracked files: (use "git add <file>..." to include in what will be committed) homebrew-cask/ nothing added to commit but untracked files present (use "git add" to track) Dropped refs/stash@{0} (7f413ded69914ef213d6e822b4679367d2c7c46e) 然后捏????怎么不对啊。。。
1 Lax 2019-01-28 02:33:32 +08:00 是不是多了个目录: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/homebrew-cask/ 猜的 |
2 lovestudykid 2019-01-28 02:51:10 +08:00 我也一直遇到这个问题,执行了那条命令后可能会修复,但过一段时间又出现。 没改过那些文件,但有次 git clone 下来,查找一个软件历史版本安装过。 |
3 yuikns 2019-01-28 07:15:40 +08:00 > nothing added to commit but untracked files present (use "git add" to track) 建议: cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask git add . -A git stash git stash drop git reset --hard origin/master |
4 wd 2019-01-28 07:38:22 +08:00 via iPhone 如果自己没动过那目录的话 应该可以删除然后重新 tap 一下 |
6 xwxw 2019-05-14 12:05:53 +08:00 如果没使用 brew-cask,则直接把 /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask 这个目录删除即可。 |
7 CFO 2020-03-14 22:18:12 +08:00 试下 brew update-reset |
8 isteveyang 2021-05-31 21:25:47 +08:00 cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask && git stash pop 如果出现 .DS_Store already exists, no checkout error: could not restore untracked files from stash The stash entry is kept in case you need it again. 那就是.DS_Store 一开始没被 ignore 的问题,直接 git stash && git clean -d -f 就 OK 了 |