What is the 'standard' content of .gitignore for an iPhone (Xcode) project?

北城以北 提交于 2019-12-17 22:48:55

问题


What is considered the 'standard' content of .gitignore file for an iPhone (Xcode) project?

PS: not sure if this needs to be a CW.


回答1:


build/
.DS_Store
**/*.pbxuser
*.mode2v3
*.mode1v3
**/*.perspectivev*

This is a good start.

updated with Dave's suggestions.




回答2:


You should also exclude xcworkspace and xcuserdata in xcode 4.2. So here is a complete list which one should ignore for iOS projects

# Exclude the build directory
build/*

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

# Exclude OS X folder attributes
.DS_Store

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



回答3:


From the GitHub gitignore project, as of today:

# Xcode
.DS_Store
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.xcworkspace
!default.xcworkspace
xcuserdata
profile
*.moved-aside
DerivedData
.idea/

Source: https://github.com/github/gitignore/blob/master/Objective-C.gitignore



来源:https://stackoverflow.com/questions/3066698/what-is-the-standard-content-of-gitignore-for-an-iphone-xcode-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!