惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threatpost
aimingoo的专栏
aimingoo的专栏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tailwind CSS Blog
J
Java Code Geeks
博客园_首页
Google Online Security Blog
Google Online Security Blog
Hugging Face - Blog
Hugging Face - Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
I
Intezer
P
Palo Alto Networks Blog
V
Vulnerabilities – Threatpost
雷峰网
雷峰网
O
OpenAI News
SecWiki News
SecWiki News
小众软件
小众软件
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
N
News | PayPal Newsroom
Project Zero
Project Zero
Forbes - Security
Forbes - Security
IT之家
IT之家
A
Arctic Wolf
WordPress大学
WordPress大学
Jina AI
Jina AI
T
Tor Project blog
博客园 - 三生石上(FineUI控件)
S
Secure Thoughts
Google DeepMind News
Google DeepMind News
Attack and Defense Labs
Attack and Defense Labs
博客园 - 聂微东
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Privacy International News Feed
Cloudbric
Cloudbric
G
GRAHAM CLULEY
博客园 - 叶小钗
H
Hacker News: Front Page
腾讯CDC
量子位
Help Net Security
Help Net Security
人人都是产品经理
人人都是产品经理
C
Cyber Attacks, Cyber Crime and Cyber Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
爱范儿
爱范儿
L
Lohrmann on Cybersecurity
Hacker News - Newest:
Hacker News - Newest: "LLM"
Recorded Future
Recorded Future
C
CERT Recently Published Vulnerability Notes

博客园 - loop

xcode 编译器在各个arch下面默认宏 parallels无法启动之大乌龙-流水账版 关于结对敏捷开发 android openmax hardware decoder 整合记录 mac上parallel与virtualbox无法共存 git submodule 使用 VLC plugin加载代码分析 在parallel中安装archlinux + awesome inline 小结 小米盒子试用 keepass管理密码 chrome同步书签cpu占用率过高问题解决 git对svn操作 mac上的ssh proxy客户端 --iSSH个人修改版 终于可以在家更新mplayer了 不要一个人吃饭 在archlinux中安装chrome 关于MP4 fileformat中 duration及timescale相关的几个地方 linux ramdom hung up
brew 出现 git 错误的问题分析
loop · 2015-08-26 · via 博客园 - loop

现象

  1. brew update的时候出现 gitcrash

分析

  1. 在brew update 的时候看见有 git gc 的字样,提示有在gc 的动作。到/usr/local/ 目录,直接运行 git gc 出现同样的问题。
  2. 备份/usr/local/.git 目录,发现其中一个文件/usr/local/.git/objects/pack/pack-a9xxxxxxxxxxxxxxxxxxxx.pack 文件copy 失败。应该是文件系统出现了问题。
  3. 重启进入恢复模式,修复文件系统。无效
  4. 用 cat 打开这个文件同样失败。用 sublime 打开这个文件,再重新保存,发现文件长度少了一半。dd 方式 copy 情况与 sublime 类似,但文件内容会比 sublime 稍多一些。
  5. 强制删除掉这个 pack 文件和对应的 idx 文件。出现 git 操作一直提示缺少某几个 object 的情况。
  6. 观察该文件夹git 的 remote repository。可以看到远程的 git 地址

解决方案

  1. 另外的文件夹中clone 一份代码出来,用其中的.git/objects目录覆盖/usr/local/.git/objects目录。
  2. git gc 正常,brew update 正常,brew doctor 正常

loop's blog

posted on 2015-08-26 15:59  loop  阅读(738)  评论()    收藏  举报