I had a problem where Xcode not opening a project or starting at all. Sometimes it just froze. The solution I found out working was cloing the repository to another folder that is not desktop or document and it works. I also disabled iCloud, updated the Mac, cleared some cache folders, but in the end I think where the repo is opening from is the most important. Also, I removed the git account and added it again too in Xcode.