What should be in my gitignore for Xcode 7
16,357
Here's the one I tend to use:
.DS_Store
build
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
That will ignore .DS_Store
files, the build
directory, and everything in .xcodeproj
files except the file that actually contains the project's settings. If you have shared schemes, you can also add
!*.xcodeproj/xcshareddata
as show here.
Related videos on Youtube
Comments
-
Jeef over 1 year
With Xcode 7 finally released I was wondering what an appropriate setting for
.gitignore
was for Xcode projects in the new version, and whether the same settings that were applicable in XCODE 6 still apply.NOTE This is XCODE 7 Specific. There are various answers for other version of XCODE but I am unaware if 7 adds any new files or types that should be added to the .gitignore.
-
Marco over 8 yearsLook for Github gitignore file github.com/github/gitignore/blob/master/Global/Xcode.gitignore
-
Jeef over 8 yearsThis is an Xcode 7 specific question. That post you reference is for a different version of Xcode.
-
-
Arkku over 8 yearsI wouldn't ignore
*.xcodeproj
, rather ignorexcuserdata
. -
mipadi about 8 years@Arkku:
project.pbxproj
andxcshareddata
(possibly) are really the only files in the a.xcodeproj
that need to be tracked. -
Arkku about 8 yearsTrue at the moment (unless it contains workspaces?), but I would rather blacklist than whitelist here, since a) currently it's simpler that way, and b) the contents of
.xcodeproj
could change without notice as it is a proprietary format…