Git忽略文件.gitignore的使用:忽略DS_Store、User Interface State...

声明:本文原创,所有转载必须经过本人同意,否则默认同意支付本人稿费(千字百元)。---绪文(公众号:LearnWithSiven)

在开发中,项目中会产生一些我们不希望提交到Git的个人信息或配置的文件,现使用.gitignore文件忽略掉。



Step 1: 进入项目目录:cd  <ProjectName>

Step 2: 查看状态: git  stauts

Step 3: 创建gitignore文件:touch  .gitignore    #创建隱藏文件gitignore

Step 4: 编辑gitignore文件: vim    .gitignore    #编辑该文件,下附内容,知道Vim基本命令

Step 5: Git添加.gitignore文件: git add .gitignore

Step 6: 现在可以再查看结果状态: git  stauts


附:


# ---> 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

*.xccheckout

*.moved-aside

*.xcuserstate

*.xcscmblueprint

## 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:

# http://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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 项目组件化、平台化是技术公司的共同目标,越来越多的技术公司推崇使用pod管理第三方库以及私有组件,一方面使项目架构...
    swu_luo阅读 22,784评论 0 39
  • Mac ox 系统下,部分文件默认为隐藏,所以创建git仓库里的文件将不可见,可通过以下终端命令行实现 显示&隐藏...
    luowanglin阅读 5,867评论 0 1
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 136,264评论 19 139
  • 《相思成灾》 冷冷的冰雨落到心 依然没能冰封 对你思念的热度 我以为 我只在夜晚梦到你 朗朗的晴空 恍惚里 你就和...
    晚熟的柿子阅读 2,713评论 0 0
  • (一) 丁酉鸡年,农历正月十一。 大红灯笼沿着长街挂成一条祥龙,多数商铺已经恢复营业,门口贴着喜气洋洋的春联迎接熙...
    938a04943d8a阅读 3,165评论 0 2

友情链接更多精彩内容