7

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

enter image description here

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?

Anthony Kong
  • 37,791
  • 46
  • 172
  • 304

2 Answers2

0

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.

0

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.

Tambling
  • 21
  • 3