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

前端之家收集整理的这篇文章主要介绍了哪些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和其他一些随着时间推移出现的内容.

猜你在找的iOS相关文章