git status‘ failed with code 128:‘fatal: 解决方案(亲测有效!!!)

sourceTree

正在上传…重新上传取消​Kieran Senior [Atlassian] added a comment - 18/Dec/2013 9:42 AM

Hey Ray,

This is because your index file has been corrupted. You could do the following. Using the terminal and changing your directory to your repository you can do the following (making sure you back up your repository first, just in case):

 
  1. rm .git/index

  2. git add .

Or if you have changes in your working directory you want to keep you can do the following:

 
  1. rm .git/index

  2. git reset HEAD .

This can also be caused by conflicts with submodules, so if you have any submodules it might be worth looking into it.

Try that out and if it works if you could comment back to let me know that'd be great.

Thanks!

转载于:https://my.oschina.net/u/1177694/blog/647305

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值