56

I noticed that Xcode 7 creates a new .xcscmblueprint file in the xcshareddata folder. Will it be always auto generated? Should this file be added to the ignore list of the repository, or should it be checked in into repository?

Xcode 6 has the .xccheckout file, I've always gitignore'd that file.

zavié
  • 4,301
  • 2
  • 34
  • 46
  • 1
    Apparently not: http://stackoverflow.com/a/19260712/6309 or https://gist.github.com/tokorom/5829394 – VonC Jul 23 '15 at 10:30
  • what does the discussion about `.xcceckout` gotta do with anything? ie in both the OP's question as well as the comment above? – abbood Sep 23 '15 at 05:44
  • 1
    They are similar in content. – zavié Sep 23 '15 at 06:04
  • FYI, VonC's `apparently not` comment means, "Apparently you should NOT ignore .xcscmblueprint and here is why" and his link mentions why. – Alex Zavatone Aug 31 '16 at 15:53

3 Answers3

51

I'm gitignoring them, for exactly the same reason as .xccheckout.

GitHub's maintained .gitignore added that too, for both Objective-C and Swift. https://github.com/github/gitignore

Ewan Mellor
  • 6,747
  • 1
  • 24
  • 39
  • 1
    Thanks for the link! That's a great argument. I'm going to adopt Github's gitignore template as well. BTW here's the direct link to the Swift gitignore template: https://github.com/github/gitignore/blob/master/Swift.gitignore – zavié Jul 27 '15 at 10:35
  • Today, it was also added to default Xcode .gitignore https://github.com/github/gitignore/pull/1546 – Cœur Jan 27 '16 at 10:28
  • 4
    Today, it was removed from default Xcode .gitignore, and removed for Objective-C and Swift as well: https://github.com/github/gitignore/pull/1686 – Cœur Feb 28 '16 at 02:18
  • @AlexZavatone Yup, everything in xcshareddata should never be ignored… yet nobody seems to understand that… – Frizlab Oct 09 '16 at 15:28
5

I think it depends. Just like @Ewan Mellor said the reason for ignore .xcscmblueprint is same with it for .xccheckout.

But whether ignore .xccheckout depends on your project . If you are using single project there is no need. If you are using workspace committing xccheckout file is need. For more the answer @Chris Hanson published is feed your need.

Back to the question. The content of the xcscmblueprint contains the main information about your project.

And I'm not sure it will change in the future. As the same reason for xccheckout I would like to commit this file.

Community
  • 1
  • 1
lynulzy
  • 561
  • 7
  • 19
  • 3
    You should always .gitignore .xccheckout. From http://stackoverflow.com/questions/18340453/should-xccheckout-files-in-xcode5-be-ignored-under-vcs/19260712#comment29617170_19260712: "It looks like xccheckout contains keys and names which are specific to each developer's machine... As soon as I run xcode it changes some keys in the file [...]. If this file is supposed to be shared, then Apple have done a pretty poor job." – Cœur Jan 27 '16 at 10:38
1

The files seems to contain information pertaining to your source code repository. I think the "SCM" part of the filename stands for "Source Code Management". When looking at the one in my project, it indeed contains information about the GitHub repository that my XCode projects it (and also the git submodules that my repository uses, that's neat!). Of course, it also contains hashes so one could wonder if they are stable across developer, but I'd bet they are.

For that reason, I back up the advice given in many comments. You DO want to version this file.

user1427799
  • 869
  • 7
  • 5