• 为什么要配置.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-CSwift会帮助你生成下面的配置。


# 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

这个配置自动生成了很多注释和一些不太必要的配置,所以直接使用上面提供的简便配置就好。

 
参考链接:http://www.jianshu.com/p/35780446b133

.gitigore 相关的更多相关文章

  1. 嵌入式单片机STM32应用技术(课本)

    目录SAIU R20 1 6 第1页第1 章. 初识STM32..................................................................... ...

  2. java中的字符串相关知识整理

    字符串为什么这么重要 写了多年java的开发应该对String不陌生,但是我却越发觉得它陌生.每学一门编程语言就会与字符串这个关键词打不少交道.看来它真的很重要. 字符串就是一系列的字符组合的串,如果 ...

  3. SQL Server相关书籍

    SQL Server相关书籍 (排名不分先后) Microsoft SQL Server 企业级平台管理实践 SQL Server 2008数据库技术内幕 SQL Server性能调优实战 SQL S ...

  4. dotNET跨平台相关文档整理

    一直在从事C#开发的相关技术工作,从C# 1.0一路用到现在的C# 6.0, 通常情况下被局限于Windows平台,Mono项目把我们C#程序带到了Windows之外的平台,在工作之余花了很多时间在M ...

  5. 在ASP.NET Core应用中如何设置和获取与执行环境相关的信息?

    HostingEnvironment是承载应用当前执行环境的描述,它是对所有实现了IHostingEnvironment接口的所有类型以及对应对象的统称.如下面的代码片段所示,一个HostingEnv ...

  6. virtualbox linux虚拟机相关

    linux虚拟机设置为静态IP 在virtualbox中安装好linux虚拟机后,如果采用的是NAT方式的话,linux虚拟机默认采用dhcp方式自动上网,而且用的是NetworkManager服务而 ...

  7. WebGIS中等值面展示的相关方案简析

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.背景 等值面是气象.环保等相关项目上常用到的效果展示.在传统的CS项 ...

  8. .NET同步与异步之相关背景知识(六)

    在之前的五篇随笔中,已经介绍了.NET 类库中实现并行的常见方式及其基本用法,当然.这些基本用法远远不能覆盖所有,也只能作为一个引子出现在这里.以下是前五篇随笔的目录: .NET 同步与异步之封装成T ...

  9. zookeeper集群的搭建以及hadoop ha的相关配置

    1.环境 centos7 hadoop2.6.5 zookeeper3.4.9 jdk1.8 master作为active主机,data1作为standby备用机,三台机器均作为数据节点,yarn资源 ...

随机推荐

  1. HDU 1009 FatMouse' Trade(贪心)

    FatMouse' Trade Problem Description FatMouse prepared M pounds of cat food, ready to trade with the ...

  2. ios navigationController代码创建

    1.新建类文件FirstViewController,subClass of:UIViewController 2.新建类文件MYNavigationController,subClass of:UI ...

  3. LYNC2013介绍和基础架构准备角色

    LYNC2013部署系列PART1:LYNC2013介绍和基础架构准备 前言:LYNC 2013发布已经很久了,本人一直在进行相关的学习和测试,在有限的资源条件下,把能够模拟出来的角色进行了安装部署, ...

  4. SASL - 简单认证和安全层

    转自:http://blog.csdn.net/id19870510/article/details/8232509 SASL - 简单认证和安全层 SASL是一种用来扩充C/S模式验证能力的机制认证 ...

  5. 去掉matlab图片空白边缘

    在图形文件figure的菜单上点击file->export setup size选项中,对"expand axes to fill figure"选项打勾,如下图:

  6. 移动端解决input focus后键盘弹出,高度被挤压的问题

    //解决弹出键盘页面高度变化bug var viewHeight = window.innerHeight; //获取可视区域高度 $("input").focus(functio ...

  7. A. Mike and Cellphone(Round 361 Div.2)

    写一半去开程序的时候不小心关了网页,LOFTER我都不奢望加入代码高亮,最起码我关闭的时候弹个对话框,再不济也给我定时保存一下草稿吧. A. Mike and Cellphone time limit ...

  8. JQuery简介及HelloWorld

    一.JQuery是什么: -JQuery是一个JavaScript框架. 二.JQuery的优点: –轻量级 –强大的选择器 –出色的 DOM 操作的封装 –可靠的事件处理机制 –完善的 Ajax – ...

  9. yaf for ubuntu安装

    一.安装yaf需要的扩展 apt-get install perl-modules apt-get install libpcrecpp0 apt-get install libpcre3 libpc ...

  10. pig、hive以及hbase的作用

    Pig Pig是一种数据流语言,用来快速轻松的处理巨大的数据.Pig包含两个部分:Pig Interface,Pig Latin.Pig可以非常方便的处理HDFS和HBase的数据,和Hive一样,P ...