If anyone still encounters this issue after trying the above suggestions, the simplest solution is to back up the current project, optionally to GitHub, delete the folder, and then clone the repository again later.