Useful .gitignore file for xcode explained
This is a useful .gitignore file I've found from the web and use in my projects. It makes my projects more portable.
You can download a copy of the file here.
.DS_Store | Desktop Services Store (positioning etc) http://en.wikipedia.org/wiki/.DS_Store |
build/* | Pre-complied object files and others file making compile time shorter |
*.pbxuser | "... the currently active target, executable, and build style" |
!default.pbxuser | This rule overrides the one above to make the default one tracked by git |
*.mode1v3 | "... window positions and sizes" |
!default.mode1v3 | This rule overrides the one above to make the default one tracked by git |
*.mode2v3 | Same as mode1v3 |
!default.mode2v3 | This rule overrides the one above to make the default one tracked by git |
*.perspectivev3 | I don't have any of these on my system. If someone could let me know what they are |
!default.perspectivev3 | This rule overrides the one above to make the default one tracked by git |
*.xcworkspace | "... workspace settings including and the View (Navigator, Debug, and Utilities panes) and Editor states" |
!default.xcworkspace | This rule overrides the one above to make the default one tracked by git |
xcuserdata | User specific files |
profile | I don't have any of these on my system. If someone could let me know what they are |
*.moved-aside | Deprecated classes, for example, if you re-created a new class with the same name as an older one |
If a file is already being tracked, adding a rule to the .gitignore file won’t stop it being tracked.
You’ll need to do git rm --cached to make git ignore it and add a rule for it to the .gitignore file.
The first time you clone a repo that uses this git ignore file it might look weird, no information about the state of your IDE (window ,etc) will have been recorded.