4

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 :(

aspirant_sensei
  • 1,568
  • 1
  • 16
  • 36
  • Try installing Git for Windows and doing it from the command line. Or start VS as admin and retry that. I imagine git does not have permissions to delete directories? – Bogdan Gavril MSFT May 06 '16 at 13:49
  • 1
    Well that's what I was saying in my post - if I use the command line it works fine and TFS shows the branch switching over, but I don't really want to lose the option to run commands in the GUI. I also have started VS as admin :( – aspirant_sensei May 06 '16 at 13:51

1 Answers1

1

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.

aspirant_sensei
  • 1,568
  • 1
  • 16
  • 36