1

I have a repository, in which i code. Once some changes are made, they are checked in to GIT repo via Xcode.

Before checking in .. files look like this - files i have changed look right

enter image description here

Upon checking the code in (Alt-Command-C), all i see is (Note that files seen in explorer window are not seen)

enter image description here

Towards the bottom of the screen, correct number of files are shown

enter image description here

When commit button is hit, no errors are shown, all looks normal, however, nothing (visually) changes:

  • Explorer continues to show same files modified
  • Commit screen continues to show some files in need of being committed
  • Commit screen does NOT show exact files to be committed

I could have sworn that last night all files were committed. Could someone help me understand what's going on here?

UPDATE:

After modifying my .gitignore to include

*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
project.xcworkspace/
xcuserdata/
.DS_Store
*.tm_build_errors
James Raitsev
  • 92,517
  • 154
  • 335
  • 470

3 Answers3

3

You should probably create a .gitignore file and put it in your directory. The xcuserstate files are constantly changing (and are of no use to your overall commits). Your will always show changes and it will also prevent you from pushing your changes to your remote (if you have one).

There are plenty of places that will show you how to make a good gitignore file.

Git ignore file for Xcode project

Community
  • 1
  • 1
Bill Burgess
  • 14,054
  • 6
  • 49
  • 86
  • What are the xcuserstate files used for? – James Raitsev Dec 22 '11 at 21:34
  • Basically what tab you are on, what file you were last on, basically the state of Xcode at that very second. I would ignore everything you possibly can, because getting those files stuck in your project when you open it up elsewhere, or someone else opens it, turns into a trainwreck. – Bill Burgess Dec 22 '11 at 21:41
1

The issue it seems was that in my set up, Xcode defaults to File View

enter image description here

When I switched to Flat View, files which were changed showed up enter image description here

James Raitsev
  • 92,517
  • 154
  • 335
  • 470
0

First thing to try it to try to commit the files from the command line.

Run git status to see the state of things, git add <modified files>, and the git commit - you should either see an error or files will be committed.

Lirm
  • 413
  • 1
  • 4
  • 11