xcode commit missing file or directory

I'm not sure what happen but when I try to commit my changes in Xcode I get an

fatal: Could not switch to '/Users/charlesbutler/xCode/MA Mobile/MA MobileTests': No such file or directory

I have a bunch of files like this.

Is there anything I can do to remove them from being committed. A lot of them were deleted (probably manually in the project folder by me)


This just happened to me. I had deleted a folder with contents from the project folder. Xcode didn't handle that well.

What worked to fix it was to recreate an empty folder with the same name. No need to recreate its contents.

In your case I think you just need to create a new empty "MA Mobile" folder in the same location the old one was. Then commit. It worked for me.

After the first commit I deleted the new folder, then committed again. It seems that Xcode is missing the logic to handle the deletion of a whole folder with contents.

If you'd like to simply commit all changes you made, doing so through the Terminal should fix the problem.

Open the Terminal App and cd into your project directory, once there type in the following command:

git commit -a

Enter your commit message by pressing 'i' and typing it in, then press 'Esc', then ':', and type 'wq'

All done, you're problem should be fixed.

Need Your Help

Replace a element instead another element by jQuery

javascript jquery

I want replace a(or each) element(number) instead another element(number) in a class while running page.