iOS多人开发中的gitignore问题

多人项目中提交代码时,很多用户信息是不需要上传,可以保证代码提交最整洁。


git中有一个非常牛的文件(.gitignore),有了这个文件,每次本地仓储发生变更时,在这个文件内目录或者文件,即使内容变化也不会被监控,保证开发在git add时,不添加这些变更。


那么,iOS开发中的.gitignore文件如何撰写内容呢?这里有个比较通用的答案:

https://github.com/github/gitignore/blob/master/Objective-C.gitignore

# 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

*.dSYM.zip

*.dSYM

# 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

# Code Injection

#

# After new code Injection tools there's a generated folder /iOSInjectionProject

# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • afinalAfinal是一个android的ioc,orm框架 https://github.com/yangf...
    passiontim阅读 15,676评论 2 45
  • 以GitHub为远程仓库 首先创建你的github账号, 添加SSH 生成SSH 1.打开终端 ssh-keyge...
    香克斯_4e59阅读 3,405评论 0 0
  • 1.在项目的工程的路径下,vim .gitignore文件。 2.在ignore文件中,编辑一下的内容。生成ign...
    lixiaoshuai阅读 2,885评论 1 0
  • 偶成 楚龙吟 春寒未暖尚无花,微雨冷风燕子斜。 懒写诗词三百首,暂凭一曲寄天涯。
    楚龙吟阅读 2,481评论 1 1
  • 很多朋友有疑问:学习剪辑就是学习软件么? NO! 系统学习剪辑,需要的是:“剪辑理论+软件技能”(喜欢的话可以关注...
    米修Dora阅读 27,632评论 10 21