简体   繁体   English

Xcode 10 Git如何更新.gitignore以忽略与可可豆有关的新项目文件?

[英]Xcode 10 Git how to update .gitignore to ignore new project files related to cocoapods?

I have a .gitignore set up to ignore cocoa pod related files. 我设置了.gitignore来忽略可可豆相关的文件。 However, I've done a new pod install for an Xcode 10 project to fix an unrelated issue and see that there's a number of new pod-related files added to source control. 但是,我为Xcode 10项目完成了新的Pod安装 ,以解决一个不相关的问题,并看到有许多新的Pod相关文件添加到了源代码管理中。 Is this related to using Xcode 10? 这与使用Xcode 10有关吗?

How do I update my .gitignore file to ignore new file/folder types (if any) added with Xcode 10 project format? 如何更新.gitignore文件以忽略以Xcode 10项目格式添加的新文件/文件夹类型(如果有)?

在此处输入图片说明

There is nothing in Xcode 10 that wasn't already in Xcode 9.3 and Xcode 9.4. Xcode 10中没有Xcode 9.3和Xcode 9.4中没有的东西。 So a contemporary multi-project .gitignore file may nowadays simply be: 因此,当今的多项目.gitignore文件现在可能只是:

# Ignore macOS Finder user-related files
.DS_Store

# Ignore Xcode user-related files
xcuserdata/

# Ignore AppCode user-related files
.idea/

# Ignore CocoaPods installed files
Pods/

# Ignore Carthage installed files
Carthage/

Use the ! 使用! syntax if you do not want to ignore a file: 语法,如果你不想忽略一个文件:

# I want to keep that file for some reason (not recommended)
!Pods/Pods.xcodeproj/project.pbxproj

Some popular reference .gitignore but slowly getting old (disclaimer: I've committed on those): 一些流行的参考.gitignore但慢慢地变老了(免责声明:我致力于那些):

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM