1

I am trying to rename my XCode 4 project. I have tried several different ways, but nothing works. I always get the following error:

fatal: source directory is empty,
source=Desktop/Folder/OLD PROJECT NAME.xcodeproj,
destination=Desktop/Folder/NEW PROJECT NAME.xcodeproj

What's causing this error, and how can I resolve it?

3 Answers 3

2

What worked for me was:

  1. Delete the .git folder from the project directory.
  2. Now you get a different fatal error when you rename.
  3. Go to File->Source Control->Repositories and delete the repository from the list.
4
  • Hi, thanks for trying, but this isn't a GIT issue. There's no GIT folder and no repository.
    – Mark
    Commented Aug 9, 2011 at 15:39
  • That worked for me. Would be nice if there was another way in case you needed to keep the git repo. Commented Sep 8, 2011 at 1:19
  • That might have worked for Steve, but it is definitely no answer to my question. So far this problem is unsolved.
    – Mark
    Commented Sep 25, 2011 at 13:44
  • It seemed only to work for me when I had no spaces in the project name. That could be the key, but I am not sure.
    – SamB
    Commented Jan 29, 2012 at 20:01
1

I had a similar issue when I was trying to rename a project for the second time. The error was "fatal: bad source ...". The original project was called AppTemplate. The new project was called "Project1" (say). Project1 was created by doing a project rename (from the right bar) and subsequent steps (move main directory, change plist refs, rename scheme). When i tried to rename the new project, it complained that AppTemplate.xcodeproj/xcuserdata/.xcuserdatad/xcschemes/AppTemplate.xcscheme wasn't available. This is odd since i thought i eradicated all reference to the original project. Apparently not. My [hack] solution was to copy the original AppTemplate.xcscheme file from the original project into Project1 at the required location (Project1.xcodeproj/xcuserdata/.xcuserdatad/xcschemes/). The project rename then proceeded as normal. I know this was not your exact issue, but this is one of the few references to fatal errors on project rename on xcode.

2
  • Thanks, I'll try this if the issues comes up again.
    – Mark
    Commented Jul 6, 2013 at 10:46
  • You know what... since this was the only relevant answer ever posted, I'll accept it as the correct answer. Well done.
    – Mark
    Commented Jul 6, 2013 at 10:54
0

I had the same error and for me the problem was that the project I was trying to rename was not in a git repository, i.e. git saw it as a bunch of untracked files.

Adding the files to git (and committing) fixed the problem, I was able to rename the project.

It looks like Xcode 4 really wants your project files to be in a git repository.

1
  • 3
    Hi. I want to make clear that both answers given here are COMPLETELY IRRELEVANT!!!! My question has absolutely nothing to do with GIT. Thanks.
    – Mark
    Commented Nov 3, 2011 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.