iOS 开发gitignore
来源:互联网 发布:char转int c语言 编辑:程序博客网 时间:2024/06/07 16:22
为什么要配置.gitigore
在我们使用git的过程当中,不是任何文件都需要commit到本地或者远程仓库的,比如一些三方库文件。
那么作为一个git新手,很多人不知道如何配置.gitignore文件,本文只是提供一个便捷的例子。你可以直接使用本文提供的代码编辑到你的.gitigore文件中。
简便配置
直接复制下面的内容到你的.gitignore文件即可。注意,这个配置是给iOS开发者使用的。
# Xcode.DS_Store*/build/**.pbxuser!default.pbxuser*.mode1v3!default.mode1v3*.mode2v3!default.mode2v3*.perspectivev3!default.perspectivev3xcuserdataprofile*.moved-asideDerivedData.idea/*.hmap*.xccheckout*.xcworkspace!default.xcworkspace#CocoaPodsPods!Podfile!Podfile.lock
到gitignore.io去选择自定义配置
在 gitignore.io 输入你需要配置的语言,会帮助你自动生成一份配置。比如,输入Objective-C
和Swift
会帮助你生成下面的配置。
# Created by https://www.gitignore.io/api/objective-c,swift### Objective-C #### Xcode## gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore## Build generatedbuild/DerivedData/## Various settings*.pbxuser!default.pbxuser*.mode1v3!default.mode1v3*.mode2v3!default.mode2v3*.perspectivev3!default.perspectivev3xcuserdata/## Other*.moved-aside*.xcuserstate## Obj-C/Swift specific*.hmap*.ipa# CocoaPods## We recommend against adding the Pods directory to your .gitignore. However# you should judge for yourself, the pros and cons are mentioned at:# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control## Pods/# Carthage## Add this line if you want to avoid checking in source code from Carthage dependencies.# Carthage/CheckoutsCarthage/Build# fastlane## It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the # screenshots whenever they are needed.# For more information about the recommended setup visit:# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.mdfastlane/report.xmlfastlane/screenshots### Objective-C Patch ###*.xcscmblueprint### Swift #### Xcode## gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore## Build generatedbuild/DerivedData/## Various settings*.pbxuser!default.pbxuser*.mode1v3!default.mode1v3*.mode2v3!default.mode2v3*.perspectivev3!default.perspectivev3xcuserdata/## Other*.moved-aside*.xcuserstate## Obj-C/Swift specific*.hmap*.ipa## Playgroundstimeline.xctimelineplayground.xcworkspace# Swift Package Manager## Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.# Packages/.build/# CocoaPods## We recommend against adding the Pods directory to your .gitignore. However# you should judge for yourself, the pros and cons are mentioned at:# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control## Pods/# Carthage## Add this line if you want to avoid checking in source code from Carthage dependencies.# Carthage/CheckoutsCarthage/Build# fastlane## It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the# screenshots whenever they are needed.# For more information about the recommended setup visit:# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.mdfastlane/report.xmlfastlane/Preview.htmlfastlane/screenshotsfastlane/test_output
这个配置自动生成了很多注释和一些不太必要的配置,所以直接使用上面提供的简便配置就好。
作者:马克叔_Marco
链接:http://www.jianshu.com/p/35780446b133
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
阅读全文
0 0
- iOS 开发gitignore
- iOS开发59- .gitignore的使用
- 【iOS开发】配置忽略文件.gitignore 文件
- ios gitignore
- iOS:XCode项目.gitignore
- iOS中的.gitignore文件
- iOS中.gitignore的使用
- iOS中创建.gitignore文件
- ios 项目 .gitignore 文件配置
- gitignore
- .gitignore
- .gitignore
- .gitignore
- .gitignore
- .gitignore
- .gitignore
- .gitignore
- .gitignore
- 网络原理,以及对VMware Workstation虚拟网络VMnet0、VMnet1、VMnet8的图解
- Bootstrap实现部分网页中常见的页面效果!
- 管理信息系统---第一遍导图
- 数据结构【排序算法】——冒泡排序
- VTK图像处理之访问图像像素值
- iOS 开发gitignore
- POJ1458CommonSubsequence
- ofbiz service 参数验证
- 向量基础性质
- 数据结构【排序算法】——快速排序
- win10下安装ubantu16.04LTS注意事项
- 课本8.19 kite问题的NP完全问题证明
- iOS 蓝牙使用
- 对网络应用层的理解(二)