XCode 6.0.1 error when creating project: The file “exclude” doesn't exist

泄露秘密 提交于 2019-11-30 13:04:41

问题


When I create a new project in XCode 6.0.1, I got this error message: The file "exclude" doesn't exist

It seems to only impact the versioning of the files i.e. the generated stub files are not committed into github after the project is created.

What can cause this problem?


回答1:


For me the issue was caused because I had previously created a project with the same name, and Xcode still had record of that.

To clear it out,

  1. go to Window -> Organizer in the menu bar
  2. Remove all of the repositories highlighted in red

To add your repository (if it's not being tracked for some reason),

  1. Click the + (still in Window -> Organizer from the steps above)
  2. Enter the path of your file
  3. Make sure to change to Git from Subversion (if Xcode has Subversion set as default - it did for me.

I usually get this error if I initialize an Xcode project with a git repository, delete it and try to recreate it with the same name (casing doens't appear to make it sufficiently 'different'). Turns out, "Well I'll just start over" can leave some issues as well.

Hope this helps.




回答2:


I had this issue as well, and I tracked it down to the .git-template folder included with Thoughtbot's dotfiles. Basically, Xcode expects its template folder to have info/exclude, and Thoughtbot's dotfiles don't. Creating that directory and file fixed the problem, as so (in the Terminal):

cd ~/.git_template
mkdir info
cd info
touch exclude

If you're getting this issue without Thoughtbot's dotfiles, you could probably look at ~/.gitconfig and use whatever templatedir is getting set as instead of ~/.git_template in the first command.



来源:https://stackoverflow.com/questions/26050229/xcode-6-0-1-error-when-creating-project-the-file-exclude-doesnt-exist

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!