微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

哪些Xcode项目文件可以从我的git repo中排除?

我正在开发一个iOS项目,并使用git进行版本控制.我正在与另一位开发人员合作.

我应该保留哪些Xcode项目文件在repo中,哪些可以排除,这样不会对其他开发者产生负面影响?

这里有一些非代码文件,git告诉我已被修改添加
(BTW,这些仅在OSX文件管理器中可见,如果您的“Pro Package.xcodeproj”的“显示内容”)

排除?

> content.xcwordspacedata(我认为这只是工作区设置)
> UserInterfaceState.xcuserstate(根据名字看起来只是我特有的)
> Breakpoints.xcbkptlist(…我的断点设置)

包括

> project.pbxproj(INCLUDE …项目设置)
> * .xscheme(INCLUDE …方案定义)
> xschememanagement.plist(INCLUDE …方案管理器设置?)

这是否正确?

(只是希望使用git的排除功能用户的FYI)在本地存储库中编辑您的.git / info / exclude文件放入要git忽略的文件文件或模式,例如,如果你想要git忽略foo.temp,bar.temp,你可以在文件中放一行* .temp)

解决方法

认为这是开始 Xcode .gitignore的好地方
# 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

这个我修改Xcode .gitignore我相信它更全面.

# 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

.DS_Store
.AppleDouble
.LSOverride

 # Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

上面添加了CocoaPods,Carthage和其他一些随着时间推移出现的内容.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐