OC项目忽略文件配置

简介----主要解决的问题

oc项目常用的忽略文件;
针对已经加入版本控制的文件,让gitignore生效的方法;
引用他人忽略文件的一个阐述

1. OC项目中忽略文件内容
# 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 
*.xccheckout 
*.xcscmblueprint 
## Obj-C/Swift specific 
*.hmap 
*.ipa 
*.dSYM.zip 
*.dSYM 
## 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/ 
# Package.pins 
.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/ 
*.xcworkspace 
# 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://docs.fastlane.tools/best-practices/source-control/#source-control 
fastlane/report.xml 
fastlane/Preview.html 
fastlane/screenshots 
fastlane/test_output
2. 针对已经加入版本控制文件(文件量比较大),让gitignore生效的方法

依次执行下面的命令:

git rm -r --cached .
git add . 
git commit -m 'commit log info'

// 如果是一小部分文件,可以使用下面的命令
git rm -r --cached file(要忽略的文件)
git add .
git commit -m 'commit log info'

3. Git 忽略文件不加入版本控制匹配规则

链接

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值