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\':
I had this problem after adding and then deleting sub-projects in a project that was under source control.
I fixed it by using the GitX application, selecting the Commit View
, un-staging the now non existent files from the Staged Changes
list, and then selecting Discard Changes
for the same files in the Unstaged Changes
list.
I then had to delete the repository from the Xcode Organiser-Repositories
screen and restart Xcode before things were working ok again. Xcode automatically re-adds the repository back in when the project is re-opened.
Perhaps someone with GIT expertise can provide a command line alternative that performs a "Discard all changes that are no longer present on disk" action