Whenever I checkout a branch on my git repository that is old enough to not contain a recently added folder (thus causing git to try and delete the folder), the folder gets locked.
For example, I am working on a project that involves a couple of different modules. I was on the 'cases' branch, which had added files to a new directory ('[root]\src\app\data\cases'). I then checked out the 'chat' branch, which was old enough that it did not contain this directory. No error message occurred during the processes, but trying to navigate to this directory produces the following message (given as a Windows error dialog box):
Location is not available
[root]\src\app\data\cases is not accessible.
Access is denied.
The folder is definitely there, as it shows up in Explorer. Also, gulp refuses to start when the directory is present, citing the following error:
Error: EPERM: operation not permitted, scandir '[root]\src\app\data\cases'
I have tried updating to the latest version of git, and am now running 2.7.3.windows.1
. I have a 64-bit Windows 10 laptop. While I would very much like to resolve this issue, restarting the computer does fix it. This is a possible workaround, although that does mean minutes of time lost each time I checkout with a new folder (there is no issue if the current directory has no new folders compared with the directory to be checked out).
Thanks in advance for whatever advice you can give.