iOS日常学习 - 如何配置.gitignore文件
文章为转载学习,原文地址
为什么要配置.gitigore
在我们使用git的过程当中,不是任何文件都需要commit到本地或者远程仓库的,比如一些三方库文件。
那么作为一个git新手,很多人不知道如何配置.gitignore文件,本文只是提供一个便捷的例子。你可以直接使用本文提供的代码编辑到你的.gitigore文件中。
简便配置
直接复制下面的内容到你的.gitignore文件即可。注意,这个配置是给iOS开发者使用的。
# Xcode
.DS_Store
*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
profile
*.moved-aside
DerivedData
.idea/
*.hmap
*.xccheckout
*.xcworkspace
!default.xcworkspace
#CocoaPods
Pods
!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 generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## 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/Checkouts
Carthage/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.md
fastlane/report.xml
fastlane/screenshots
### Objective-C Patch ###
*.xcscmblueprint
### Swift ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xcuserstate
## Obj-C/Swift specific
*.hmap
*.ipa
## Playgrounds
timeline.xctimeline
playground.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/Checkouts
Carthage/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.md
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
这个配置自动生成了很多注释和一些不太必要的配置,所以直接使用上面提供的简便配置就好。
iOS日常学习 - 如何配置.gitignore文件的更多相关文章
- 第四十四篇、iOS开发中git添加.gitignore文件
.gitignore文件可以直接使用https://github.com/github/gitignore 1.在项目中设置忽略文件(1)将从github上荡下来的对应的.gitignore文件(Sw ...
- iOS日常学习 - App之间常用的五种通信方式及适用场景总结
本文为转载学习,原文地址 iOS系统是相对封闭的系统,App各自在各自的沙盒(sandbox)中运行,每个App都只能读取iPhone上iOS系统为该应用程序程序创建的文件夹AppData下的内容,不 ...
- iOS日常学习 - 每个Xcode开发者应该知道的七个使用技巧
本文为转载学习使用原文链接 工欲善其事,必先利其器.对一个iOS开发者来说,这就意味着对Xcode的熟练掌握程度.Xcode是一个学习起来有点难度的软件,下面的这些技巧或许可以显著的提高你的编程效率. ...
- 【转】 iOS日常学习 - iOS10上关于NSPhotoLibraryUsageDescription等问题
原文网址:http://blog.csdn.net/wang631106979/article/details/52578001 最近升级了Xcode8.0,真是很多坑啊,填完一个来另外一个,今天又遇 ...
- iOS日常学习 - iOS10上关于NSPhotoLibraryUsageDescription等问题
最近升级了Xcode8.0,真是很多坑啊,填完一个来另外一个,今天又遇到了一个,用Xcode8.0上传项目时被驳回说是info.plist里面没有设置NSPhotoLibraryUsageDescri ...
- iOS日常学习 - 让你的 Xcode8 继续使用插件
本文转载,原文链接 随着 iOS10 的正式版即将发布,Xcode8 GM 也在发布会后放出,本文不会涉及到 Xcode8 有哪些更新,而是记录了如何让 Xcode8 继续支持 Plugin. 相信各 ...
- ios网络学习------10 原生API文件上传
使用原生态的api上传文件的实现: #import "MainViewController.h" @interface MainViewController () @propert ...
- ios网络学习------11 原生API文件上传之断点续传思路
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHVhbmcyMDA5MzAzNTEz/font/5a6L5L2T/fontsize/400/fill/I0 ...
- $git学习总结系列(4)——gitignore文件
有时候工作区中会有我们创建的一些密码配置文件,或者自动生成的一些临时文件,比如python代码编译产生的.pyc文件和java代码编译产生的.class文件等,我们在提交代码的时候没有必要把这些文件也 ...
随机推荐
- good blog
https://blog.csdn.net/fgf00/article/details/52793739
- c++主程这种事情,就是这样,看人先看人品,没人品,他的能力与你何关?
这就是人品的重要性........ 接手别人的代码,说困难,也困难,说容易也容易 想把别人代码都读通,理顺,在改原代码BUG,在完美的加功能,那项目越大,越难 想把别人代码里面,加点坑,随便找个模块, ...
- linux下的KSM内存共享机制分析
2017-04-26 KSM是内核中的一种内存共享机制,在2.6.36版本的内核中开始引入,简单来说就是其会 合并某些相同的页面以减少页面冗余.在内核中有一个KSM守护进程 ksmd,它定期扫描用户向 ...
- jquery prop attr
checked比较特殊,只要设置了属性checked,不管何值都是checked的.例如:<input type="checkbox" checked><inpu ...
- MyEclipse 10的使用技巧
默认快捷键 :Shift+Alt+s 然后选择generater getter and setter,这是快捷键.或者右键source里边有 generater getter and setter. ...
- 创建正真的Java不可变类
如果需要设计一个不可变类,尤其要注意其引用类型Field,如果其引用类型Field的类是可变的,就必须采取必要的措施来保护该Field所引用的对象不会被修改,这样才能创建真正的不可变类. class ...
- Linux 超级用户和普通用户切换命令
默认登录的是普通用户权限显示$符 tree@ubuntu:/usr$ 从普通用户切换超级用户权限: sudo su tree@ubuntu:/usr$ sudo su 输入密码 [sudo] pass ...
- Linux系统——文件和目录权限
文件及目录权限(七进制表示) r 读权限(4),允许查看文件内容 w 写权限(2),允许修改文件内容 x 可执行权限(1),允许运行程序 - 无权限(0) 属主:拥有该文件的用户账号 属组:拥有该 ...
- PHP下使用Redis消息队列发布微博(复制)
phpRedisAdmin :github地址 图形化管理界面 git clone https://github.com/ErikDubbelboer/phpRedisAdmin.git cd ph ...
- PKU 4334 Trouble(哈希)
原题链接 思路:哈希存入相反数 注意:HDU不支持long long要使用__int64 #include<cstdio> #include<cstring> #define ...