.gitignore for iOS projects

You just started to use git with your iOS projects and wants to know which files you should’t track for version control? Here is a list of files you should’t track which using git –

*~
.DS_Store

# old skool
.svn

# Exclude the build directory
build/*

# Exclude temp nibs and swap files
*~.nib
*.swp


# Exclude user-specific XCode 3 and 4 files
*.mode1
*.mode1v3
*.mode2v3
*.perspective
*.perspectivev3
*.pbxuser
*.xcworkspace
xcuserdata
*.xcodeproj/ !*.xcodeproj/project.pbxproj

 
#    NB: also, whitelist the default ones, some projects need to use these
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3



# osx noise
.DS_Store
*.swp
*.lock
profile

You just need to create a .gitignore file in your project directory and put the above content in that file.