So here's what I've been getting every now and again recently, using msysgit on Windows 7:
> git pull origin master
> Enter passphrase for key '/c/Users/Dell/.ssh/id_rsa':
remote: Counting objects: 1827, done.
remote: Compressing objects: 100% (373/373), done.
remote: Total 1019 (delta 730), reused 895 (delta 611)
Receiving objects: 100% (1019/1019), 525.92 KiB | 113 KiB/s, done.
Resolving deltas: 100% (730/730), completed with 473 local objects.
From github.com:xxxxxxx/xxxxxxxxxxx
* branch master -> FETCH_HEAD
error: git checkout-index: unable to create file
path/to/my/file.cs (Permission denied)
the file in question will be something completely random, not open ANYWHERE on my computer and not related to any recent changes. Not only does it then fail to check it out, but it marks the file as DELETED!
Can anyone shed any light on this and perhaps offer a solution?
I found the problem!
It was a race condition with DropBox. DropBox now supports the ability to pause syncing, so I pause DropBox, do what I need to do with Git, then resume DropBox syncing and it all goes fine.
Never even occurred to me that of course DropBox was there in the background interfering.