Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am writing an iOS application in XCode. I associated a remote repository to it.

I finished writing a View Controller file and then went to File -> Source Control -> Commit. I wrote a commit message. Oddly, every time I typed a space, an error popped up that read:

1 of 2 files will be committed.

I then tried to push the commit by clicking File -> Source Control -> Push, however, I get an error that notes that I have unsaved changes. Why? Didn't I just commit?

share|improve this question
    
If you have Git installed on your machine, you could open Terminal and run git status or even git gui to see if you still have uncommitted changes. –  Isxek Apr 2 '12 at 6:37
add comment

2 Answers

up vote 2 down vote accepted

It is caused by Xcode updating the workspace files. Adding those files to .gitignore should erase this issue. Notice when you commit there is this one file that xcode keeps writing to.

Either quit xcode and use terminal or add the workspace to .gitignore

share|improve this answer
add comment

I would check a couple things.

One, make sure all of the files you want to commit are checked in the left pane. Sometimes the files aren't checked by default for some weird reason.

Secondly, try right-clicking and committing that one file by itself, see if that works. If step one didn't work, this probably won't either, but its worth a shot.

If neither of those works, when Source Control for Xcode messes up for me, I end up recreating the project. There are many ways to do this, depending on how your repo is set up. If you have an initial project file committed, you can check it out as a new project, then add the view controller again.

Xcode source control is wonky, but that's Apple for you.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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