git "fatal: .git/index: index file open failed: Permission denied"

From the verbose output, it appears that the permissions of the .git/index while might have gotten corrupted.

Confirm that this is the case by doing a ls -al .git/index followed by a chmod 644 .git/index to fix it. Then try running the git add command again.

Update

It turned out to be a (Windows) permissions issue. What worked was simply creating a copy from within msysgit of the original folder and using that (i.e. cp -rvf original original-bkup).

A reset of the permissions on the original folder should have worked, but didn't.


Mark: If you have this error in Android studio, just restart your android studio and this error will be solved. I guess that This is because of some 'cache' or 'bug' of intellij idea.