I’ve got Xcode (4.5) running a project stored in a git repository. In theory, I should be able to git checkout different versions of the code (from the command line) to see how things looked at various points in time.
In practice, Xcode doesn’t handle the changes well. Files that are missing from older versions of the source are not forgotten by Xcode. They show up in red as if they’re missing. Those files are not missing. They just didn’t exist at the time the prior commit was done.
My guess is that this is happening because of something in the xcuserdata that isn’t reset each time a new checkout happens. It’s blocked by the .gitignore.
Any idea how I can fix this? Thanks.
Problem solved. The issue was not actually with Xcode, but with what was in the Git repository itself. Rookie mistake on my part.
For future reference, the
project.pbxprojfile inside of your.xcodeprojcontains the list of what files are part of the project. That should be included in your Git repository to ensure that Xcode keeps up with what has changed in each revision.