In Xcode 5.0.2, I try to pull from a remote and am given the following message:
\"The working copy \'project-name\' has uncommitted changes. Commit or discard the change
Okay, so I fixed my issue.
With Xcode open:
git reset --hard
" git status
Restart Xcode and make a commit (Just a comment or something )
Repeat the above steps.
This sorted out my issue for me.
You must fix it with command line git. Go to your working folder in Terminal, type:
git status
That will show you what files have uncommitted changes. Crashlytics, for instance, will update itself as soon as you run it, and even using Xcode/Source Control/Discard Changes won't get rid of it.
Once you see the files that have uncommitted changes (ignore added files), use:
git checkout -- Folder/filename.ext
That's the same as a "discard" in Xcode.
After you've done that, go back to Xcode and you should be able to switch branches.
App Code solution:
Confirm git status in Terminal:
git status
Open 'yourProject.xcworkspace' in App Code
VCS > Git > Branches...
Remote Branches > yourBranch > Checkout as new local branch
Confirm fix via Terminal:
git status
xCode is really-really crappy. Everytime you just look at files, a file called UserInterfaceState.xcuserstate is changed. You don't see it in the overview of xCode itself, through the command line you can.
Quick fix:
git add .
git commit -m "Commit"
git push origin master