git tries to delete a directory on checkout

Viewed 14852

Whenever I switch between my branch (Li) to the master branch I get the following message:

Deletion of directory 'sys/console/api' failed. Should I try again? (y/n)

Anyone knows how do I get rid of this message? I think that in the past I tried to delete this directory by mistake and now I'm stuck with this error message.

3 Answers

I just had to quit out of VS Code to get the error to go away

As with all the blocking Folder/File things, use Process Explorer → Ctrl + F → type the folder name. See the vscode, notepad++ or other app that is using it, kill the process.

Related