Can't delete folder after failed git clone

Make sure that no shells, Windows explorer windows or applications are open to anything in the git subtree and try again. Next, close all your apps and try again. If that doesn't work, reboot and try again. Windows is overly protective of open files and directories, and some apps don't close them properly.


I know this is a bit old but hopefully this helps someone else who experiences this issue.

I found that, in Windows 10 at least, using the task manager to stop all git processes is enough to free up the files so they can be removed. Then simply restart git and you are good to go. No reboot required.