I've created a project to practice using Git with Xcode and GitHub. After a lot of work, I've got the repositories created both locally and remotely. I just tried to make a commit and got this error:
Here's what I'm trying to commit:
The last things I did before I got this error were:
I don't use Xcode's SCM features so I am not sure why Xcode is confused here. But it looks like the files under
git-practice-project/git-practice-project aren't known to git yet. You need to add the directory to git. On the command line from the project's root directory you could try:
That should list your files that have been modified, deleted, and that aren't part of the git repo yet.
Add the directory and its contents:
git add git-practice-project
Once you have done that, you should be good to go to use the SCM tools in Xcode again.
Update: In Xcode, you can select the file that is marked with the
? and then go to the Source Control menu and select Add Selected Files.