1

I'm currently on a team of two (including myself) iOS developers. Every time one of us pushes and the other pulls, everything works fine but git shows immediate changes to the Project.xccheckout, with the following result from my git diff:

<false/> <key>IDESourceControlProjectIdentifier</key> <string>XXXXX-XXXX-XXXX-XXXX-XXXXXXXXX</string> + <key>IDESourceControlProjectName</key> + <string>XXXXX</string> <key>IDESourceControlProjectOriginsDictionary</key> <dict> <key>XXXXXXXXXXXXXX</key> - <string>github.com:XXXXX/iOS.git</string> + <string>https://github.com/XXXXX/iOS.git</string> </dict> + <key>IDESourceControlProjectPath</key> + <string>XXXXX.xcworkspace</string> <key>IDESourceControlProjectRelativeInstallPathDictionary</key> <dict> <key>XXXXXXXXXXXXXXXXXXX</key> - <string>ios/</string> + <string>..</string> </dict> <key>IDESourceControlProjectURL</key> - <string>github.com:XXXX/iOS.git</string> + <string>https://github.com/XXXX/iOS.git</string> <key>IDESourceControlProjectVersion</key> <integer>111</integer> <key>IDESourceControlProjectWCCIdentifier</key>

When I push and he pulls, he basically gets the opposite (if I were to commit the changes and push them up). I had originally set up my local git to use HTTPS, whereas the other dev used SSL - and I suspect the issue was there. I tried to change my git config to use SSL instead, and I thought that would fix the issue, but it still remains. When I do git remote -v, the result is:

origin git@github.com:XXXXX/iOS.git (fetch) origin git@github.com:XXXXX/iOS.git (push)

Which it seems to me would have fixed the issue, as this indicates I'm using SSL vs. the result prior which was:

origin https://github.com/XXXXX/iOS.git (fetch) origin https://github.com/XXXXX/iOS.git (push)

Does anyone know what the cause of this issue is, or how to resolve it? I'm going freaking nuts having to clean out these useless changes all day.

Mike
  • 9,765
  • 5
  • 34
  • 59
  • You could just add *.xccheckout to your .gitignore... – Ian MacDonald Feb 04 '15 at 20:23
  • I vaguely recall there being a reason why we didn't want to do that, but I may be thinking of something else. I'll try that out and get back to you. – Mike Feb 04 '15 at 20:42
  • @IanMacDonald ahh yes this was what I originally read that led me to believe I shouldn't add that to my .gitignore. http://stackoverflow.com/questions/18340453/should-xccheckout-files-in-xcode5-be-ignored-under-vcs/19260712#19260712 – Mike Feb 04 '15 at 20:48
  • That's what git submodules are for, though. The answer you linked really only applies when you have multiple git projects in the same workspace that aren't dependent on each other (why?) or a mix of svn and git repos (why?). – Ian MacDonald Feb 04 '15 at 20:57
  • We only have one main workspace and everything else is CocoaPods. Do you think we would be OK to add the xccheckout? – Mike Feb 04 '15 at 21:15
  • I added that to the gitignore and stopped tracking it in the repo. I will report back after we each push/pull to make sure it went away - which I highly suspect it will. Thanks @IanMacDonald – Mike Feb 04 '15 at 21:52

1 Answers1

0

As indicated in the comments to the original question, the fix for this was to indeed add *.xccheckout to the .gitignore, and thus far we haven't had any issues.

Mike
  • 9,765
  • 5
  • 34
  • 59