git for Xcode 过滤文件.gitignore

Mac ox 系统下,部分文件默认为隐藏,所以创建git仓库里的文件将不可见,可通过以下终端命令行实现 显示&隐藏

defaults write com.apple.finder AppleShowAllFiles -bool true 显示文件

defaults write com.apple.finder AppleShowAllFiles -bool false 隐藏文件

.gitignore文件的作用 :告诉Git哪些文件不需要添加到版本管理中。

创建方式:终端相应的操作目录下执行 echo -e "....."> .gitignore

iOS开发一般通用如下操作 (复制粘贴即可):

echo -e "# 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

*.xccheckout

*.moved-aside

*.xcuserstate

*.xcscmblueprint

*.xcscheme

## 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/docs/Gitignore.md

fastlane/report.xml

fastlane/screenshots"> .gitignore

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

推荐阅读更多精彩内容

  • 1.在项目的工程的路径下,vim .gitignore文件。 2.在ignore文件中,编辑一下的内容。生成ign...
    lixiaoshuai阅读 369评论 1 0
  • 以GitHub为远程仓库 首先创建你的github账号, 添加SSH 生成SSH 1.打开终端 ssh-keyge...
    香克斯_4e59阅读 507评论 0 0
  • 项目组件化、平台化是技术公司的共同目标,越来越多的技术公司推崇使用pod管理第三方库以及私有组件,一方面使项目架构...
    swu_luo阅读 22,298评论 0 39
  • 多人项目中提交代码时,很多用户信息是不需要上传,可以保证代码提交最整洁。 git中有一个非常牛的文件(.gitig...
    寻雨的人阅读 452评论 0 1
  • 就在风吹动的那一刻,昨夜结束了 他们的恋情也结束了 犹然记得那是三十年前的夜晚 男孩在楼下等女孩的消息 可是就在昨...
    为你点一杯阳春面阅读 182评论 0 1