I have recently convinced some of my colleagues to try out using Git instead of TFVC for a new team project, I've heard of some pros of DVCS world but rather than blindly switch over I want to assess if it provides any benefit to us.
One (of many) quirks I can't seem to figure out is trying to checkout a branch and seeing
An error occured. Detailed message: Could not rmdir 'C:/.........': Access is denied.
This is when I go through TFS Team Explorer and try and checkout a new branch. I have tried removing read-only from the folder, to no avail. But what is strange, is that if I go in through the command line and run a 'git checkout develop' it works fine! And this is reflected in TFS.
I have tried searching for this message and cannot find a single webpage that discusses this error.
It's frustrating because so far the experience has been good but if I cannot resolve this then perhaps it's back to TFVC :(
I don't know if this is the best solution - but what eventually worked for me was just wiping the local repo and re-cloning.
Before I did this my reasoning was as I transferred the folders over to the new git repos for the initial commit of the source code, it may have kept some of the weird VS TFVC read-only stuff. Although I have usually been able to always override this via the File Explorer and setting read-only to false.
Strange, but it works now, so I would assume it must have been something to do with drag-dropping the TFS folder to the git repo.