Should XCSharedData be checked into Git Repo for Xcode project?

14,851

The files in xcshareddata/ should be added to the repo (but not the ones in xcuserdata/):

Xcode 9.3 adds a new IDEWorkspaceChecks.plist file to a workspace's shared data, to store the state of necessary workspace checks. Committing this file to source control will prevent unnecessary rerunning of those checks for each user opening the workspace. (37293167)

https://developer.apple.com/library/archive/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html


Regarding Xcode 9 and newer, the only line you really need in your .gitignore is:

xcuserdata/

Nothing else for Xcode 9+. Whatever other lines you have in your .gitignore should be only added for your specific needs, not because you found an obsolete .gitignore sample on the internet. :)

Share:
14,851

Related videos on Youtube

Esko918
Author by

Esko918

Updated on June 09, 2022

Comments

  • Esko918
    Esko918 almost 2 years

    I just made some changes and I see a pending file that has not been added to the repo. The filenames path is */xcshareddata/IDEWorkspaceChecks.plist. Can someone explain the reason for this file and why or why not it needs to be added to the repo?

  • Esko918
    Esko918 over 5 years
    Theres a github repo thats dedicated to all the git ignore files for all languages, so i usually just add it from there ad customize it to my needs
  • Cœur
    Cœur over 5 years
    @Esko918 Well, you may look at the author of this commit ;)