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.
Sign up to request clarification or add additional context in comments.

4 Comments

Hi, thanks for trying, but this isn't a GIT issue. There's no GIT folder and no repository.
That worked for me. Would be nice if there was another way in case you needed to keep the git repo.
That might have worked for Steve, but it is definitely no answer to my question. So far this problem is unsolved.
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.
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 Comments

Thanks, I'll try this if the issues comes up again.
You know what... since this was the only relevant answer ever posted, I'll accept it as the correct answer. Well done.
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 Comment

Hi. I want to make clear that both answers given here are COMPLETELY IRRELEVANT!!!! My question has absolutely nothing to do with GIT. Thanks.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.