iPhone (Xcode) 项目的 .gitignore 的“标准”内容是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3066698/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 19:28:18  来源:igfitidea点击:

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

iphonexcodegitversion-controlgitignore

提问by ryanprayogo

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

什么被认为是 iPhone (Xcode) 项目的 .gitignore 文件的“标准”内容?

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

PS:不确定这是否需要是 CW。

回答by kubi

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

This is a good start.

这是一个好的开始。

updated with Dave's suggestions.

更新了戴夫的建议。

回答by Saurabh

You should also exclude xcworkspaceand xcuserdatain xcode 4.2. So here is a complete list which one should ignore for iOS projects

您还应该在 xcode 4.2 中排除xcworkspacexcuserdata。所以这是一个完整的列表,对于 iOS 项目应该忽略它

# 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

回答by ohho

From the GitHub gitignoreproject, as of today:

来自 GitHubgitignore项目,截至今天:

# 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: //github.com/github/gitignore/blob/master/Objective-C.gitignore