I recently found the answer to a problem I was having here
This answer in particular rather than the accepted answer was what fixed my issue
however I wanted to add another important piece of info to Micheals answer (about adding the new dir name to your .gitignore file).
I felt this info (maybe wrongly) was important enough to be an answer in itself rather than just a comment to micheals answer. However what I really would have like to have been able to do would be to add a note to michaels answer saying that it worked in Windows, and that you should add the dir name to you .gitignore file.
Would this have been ok?