I had the same issue and solved it by cloning the repository in a new empty folder, and then copying the .git folder created to the directory of my project. It worked perfectly.