If you are getting this error then you probably reset the permissions on your hidden .ssh directory in your user folder, and your keys aren’t going to work anymore. It’s very important that these file......
If your git index for some reason becomes invalid, no need to worry.
Your index is corrupt when you see this error running usual git commands like git pull, git status, etc.:
error: bad index fi......
在使用git提交代码时,忘了添加.gitignore文件,把.DS_Store文件排除在track之外。因此会导致都被提交到了远程repo。怎么去把它删除掉呢?
$ git rm --cached *\.DS_Store
$ git commit -m "remove the .DS_Store files."
$ git push