Xcode 7 的 gitignore 中应该有什么

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31752182/
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-15 07:35:55  来源:igfitidea点击:

What should be in my gitignore for Xcode 7

iosxcodegitswiftgitignore

提问by Jeef

With Xcode 7finally released I was wondering what an appropriate setting for .gitignorewas for Xcode projects in the new version, and whether the same settings that were applicable in XCODE 6still apply.

随着Xcode 7终于发布,我想知道.gitignore新版本中 Xcode 项目的合适设置是什么,以及适用于XCODE 6的相同设置是否仍然适用。

NOTEThis is XCODE 7 Specific. There are various answers for other version of XCODE but I am unaware if 7 adds any new files or types that should be added to the .gitignore.

注意这是XCODE 7 特定的其他版本的 XCODE 有各种答案,但我不知道 7 是否添加了任何应该添加到 .gitignore 的新文件或类型。

采纳答案by mipadi

Here's the oneI tend to use:

这里是一个我倾向于使用:

.DS_Store
build
*.xcodeproj/*
!*.xcodeproj/project.pbxproj

That will ignore .DS_Storefiles, the builddirectory, and everything in .xcodeprojfiles except the file that actually contains the project's settings. If you have shared schemes, you can also add

这将忽略.DS_Store文件、build目录和.xcodeproj文件中的所有内容,除了实际包含项目设置的文件。如果您有共享方案,您还可以添加

!*.xcodeproj/xcshareddata

as show here.

作为显示在这里