GIT and Xcode arenāt working well together for me. When I want to sync with the tip, itās making conflicts with juce, since by even opening the .proj file, Iāve made changes. Then Iām not GIT savvy enough to fix them with a sweep of the hand.
Anyone have a foolproof procedure? Remaking the whole folder every time seems silly, and completely contrary to the GIT ethos.
I second the call for helpā¦cloning is getting a bit ridiculous. I tried to just trash the xcode file thinking(ala svn) that the pull would replace itā¦ no such luck
OK, I did some more Google first, and came across this: http://shanesbrain.net/2008/7/9/using-xcode-with-git
The gist is to tell GIT to treat the Xcode project file as a binary by ignoring the subfiles in .gitignore:
[code]# xcode noise
build/*
*.pbxuser
*.mode1v3
old skool
.svn
osx noise
.DS_Store
profile[/code]
And then setting an attribute in .gitattributes:
Jules, please could you change these in your GIT repo? Hopefully we will get those changes passed through, or else we may have to write this up as a sticky post.
Iāll read my book and see what it has to say too, but this sounds like a fix.
About what I said - first two attributes say treat the file as a binary, in GIT 1.6 thereās -binary flag that means the same, the third flag says leave it out of merges. The file is the actual xcode project info in the bundle, as opposed to a single users stuff.
I also wanted to add apps, so they donāt get mangled. Iām trying with .app and the same flags, but if it knows that itās a bundle that probably wonāt work. Best, as the sample does, to ignore the whole build folder?
I also added to #xcode noise:
*.model2v3
*.perspectivev3
and to #osx noise
profile
Iām not certain though - maybe you need to commit those two files so we get them when we check out the repo? Maybe thatās why itās not working well - you have some stuff locally but we donāt. Bear in mind, you also make all the xcode project changes, rarely pull them (Iād think). We have to pull yours, and thatās a lot of the shennanigans.
Iām still not entirely clear about what the problem is TBHā¦ Surely all youāre looking for is a git command that says āpull down all the latest stuff and overwrite my changesā?
As for the project file, I donāt want it to be treated as binary, because I like to be able to review the changes in it when Iām about to check it in, so canāt really do that.
Hmm. In specific terms, finding that one command would help with juce. However, Iām moved to GIT on another project, partially based on juce moving, and I need a workable scheme anyway.
Maybe I can add those flags on my side and then Iād be better able to deal with pulling, while you can do what you need. I probably donāt need, nor want your private settings - window sizes, file cursor positions etc. but do need the project - changed settings, added files etc. I have to say, after one experience with diff shotgunning my file with <<<<<<<< head etc. and trying to fix it, Iām willing to treat that file as a binary for a long, long time now.
My version of juce did not pull down your .gitignore, if youād already made those changes, btw.