SourceTree忽略xcuserdata的步骤

本文详细介绍如何在SourceTree中配置Xcode项目的.gitignore文件,包括排除特定文件和目录,如构建文件、用户设置文件及第三方依赖等。此外,还介绍了如何适当地管理CocoaPods和Carthage依赖项,以及如何排除fastlane生成的文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、打开sourcetree

2、打开偏好设置

3、选择git 

4、编辑文件

输入:

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

*.xcuserdatad


## Other

*.moved-aside

*.xccheckout

*.xcscmblueprint


## 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://docs.fastlane.tools/best-practices/source-control/#source-control


fastlane/report.xml

fastlane/Preview.html

fastlane/screenshots/**/*.png

fastlane/test_output


# Code Injection

#

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

https://github.com/johnno1962/injectionforxcode


iOSInjectionProject/

.DS_Store

保存重启sourcetree即可
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值