Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git ignore file for Xcode 4 projects

Tags:

Which files are better to ignore in git for an Xcode 4(.3.2)? This older question addresses the same issue but I find my structure to be different so I assume it's about an older version of Xcode.

like image 260
ticofab Avatar asked Jun 24 '12 12:06

ticofab


People also ask

Where is Gitignore file Xcode?

Fortunately the site gitignore.io has solved this problem for you. Go to gitignore.io, enter Xcode in the search field, and click the Create button. You will get a git ignore file with a list of file types that git should ignore. Add the git ignore file to your project folder.

How do I ignore a file in git?

If you want to ignore a file that you've committed in the past, you'll need to delete the file from your repository and then add a . gitignore rule for it. Using the --cached option with git rm means that the file will be deleted from your repository, but will remain in your working directory as an ignored file.


2 Answers

Here are git ignore files for basicly every language including Xcode : Github - git ignore

For me it is working like a charm. Here is the content of the Objective-C.gitignore

# Xcode
build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.xcworkspace
!default.xcworkspace
xcuserdata
profile
*.moved-aside
DerivedData
like image 58
Pfitz Avatar answered Oct 28 '22 01:10

Pfitz


This is what we use:

#xcode Noise
build/*
*.pbxuser
*.mode2v3
*.mode1v3
*.xcworkspace
xcuserdata

# OSX Noise
.DS_Store
profile
*~
*.lock
*.DS_Store
*.swp
*.out
like image 36
Cliff Ribaudo Avatar answered Oct 28 '22 02:10

Cliff Ribaudo