ios Xcode 6 gitignore 文件应该包括什么?

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

What should Xcode 6 gitignore file include?

iosiphonexcodegit

提问by Epic Byte

What should the typical .gitignoreinclude for Xcode 6?

典型.gitignore的 Xcode 6应该包括什么?

Also for information regarding the xccheckoutintroduced in Xcode 5 see here

此外,有关xccheckoutXcode 5 中引入的信息,请参见此处

回答by Michael Dautermann

1)

1)

The easiest answer is that mine looks like this:

最简单的答案是我的看起来像这样:

# 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/
# Pods - for those of you who use CocoaPods
Pods

which I believe is the same .gitignore that GitHub sets up with all their repositories by default.

我相信这与 GitHub 默认为其所有存储库设置的 .gitignore 相同。

2)

2)

Another answer is that there's a website called "gitignore.io", which generates the files based on the .gitignore templates from https://github.com/github/gitignore.

另一个答案是有一个名为“gitignore.io”网站,它根据来自https://github.com/github/gitignore的 .gitignore 模板生成文件。

回答by crosscode

If you are creating a new project from scratch in Xcode 6 ... there is no need for a long .gitignore file anymore, as I pointed out in my last post: Apple optimized the standard project file and folder structure to meet the requirements for clear and straight forward git commits. Apple also ignores two file patterns by default if you create the git repository with a Xcode project template:

如果您在 Xcode 6 中从头开始创建一个新项目......不再需要一个很长的 .gitignore 文件,正如我在上一篇文章中指出的:Apple 优化了标准项目文件和文件夹结构以满足以下要求清晰直接的 git 提交。如果您使用 Xcode 项目模板创建 git 存储库,Apple 还会默认忽略两种文件模式:

.DS_Store
UserInterfaceState.xcuserstate

They added them to your .git/info/excludesfile in your project directory. So no need to re-ignore them in .gitignore :-)

他们将它们添加到您.git/info/excludes的项目目录中的文件中。所以不需要在 .gitignore 中重新忽略它们:-)

The only thing I always include in a .gitignorefile is the

我总是包含在.gitignore文件中的唯一内容是

# Exclude personal Xcode user settings
xcuserdata/ 

回答by whyceewhite

Refer to Github's Xcode.gitignorefile to always have an updated listing of which Xcode files to ignore.

请参阅 Github 的Xcode.gitignore文件以始终拥有要忽略的 Xcode 文件的更新列表。