哪些Xcode项目文件可以从我的git repo中“排除”? [英] Which Xcode project files can I 'exclude' from my git repo?

查看:236
本文介绍了哪些Xcode项目文件可以从我的git repo中“排除”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个iOS项目,并使用git来进行版本控制。我正在与其他开发人员一起工作。



我应该在回购库中保留哪些Xcode项目文件,以及哪些可以排除,以便不影响其他开发人员开发人员负面?

以下是git告诉我的一些非代码文件已被修改或添加...
(顺便说一句,这些只是如果您为YourProject.xcodeproj文件显示包装内容,则可以在OSX文件管理器中查看)



排除?




  • contents.xcwordspacedata(我认为这只是工作区设置)
  • UserInterfaceState.xcuserstate(根据名称,它似乎只是特定的给我)

  • Breakpoints.xcbkptlist(...我的断点设置)


INCLUDE?




  • project.pbxproj(INCLUDE ...项目设置)
  • *。xscheme(INCLUDE ...方案定义)

  • xschememanagement.plist(INCLUDE ...方案管理器设置?)



  • 这看起来不错吗?



    (对于那些想要使用排除git的功能。编辑您的本地存储库中的.git / info / exclude文件。放入你想让git忽略的文件或模式。例如,如果你想让git忽略foo.temp,bar.temp,你可以在文件中放一行,说* .temp)

    解决方案

    div>

    认为这是一个很好的开始 Xcode .gitignore

     #Xcode 

    #gitignore贡献者:记住更新Global / Xcode.gitignore,Objective-C.gitignore& Swift.gitignore

    ##构建生成的
    构建/
    DerivedData

    ##各种设置
    * .pbxuser
    ! default.pbxuser
    * .mode1v3
    !default.mode1v3
    * .mode2v3
    !default.mode2v3
    * .perspectivev3
    !default.perspectivev3
    xcuserdata

    ##其他
    * .xccheckout
    * .moved-aside
    * .xcuserstate

    我修改了 Xcode。 gitignore 我相信它会更全面。

     #Xcode 

    #gitignore贡献者:记得更新Global / Xcode.gitignore,Objective-C.gitignore& Swift.gitignore

    ##构建生成的
    构建/
    DerivedData

    ##各种设置
    * .pbxuser
    ! default.pbxuser
    * .mode1v3
    !default.mode1v3
    * .mode2v3
    !default.mode2v3
    * .perspectivev3
    !default.perspectivev3
    xcuserdata

    ##其他
    * .xccheckout
    *。移除
    * .xcuserstate
    * .xcscmblueprint

    ## Obj-C / Swift特定的
    * .hmap
    * .ipa

    #CocoaPods

    #我们建议您不要添加豆荚目录到你的.gitignore。然而,
    #你应该自己判断,优点和缺点提到:
    #http://guides.cocoapods.org/using/using-using-cocoapods.html#should-i-check-the - pods-directory-into-source-control

    #Pods /

    #Carthage

    #如果你想避免,增加这一行检查来自Carthage依赖项的源代码。
    #Carthage / Checkout

    Carthage / Build
    $ b .DS_Store
    .AppleDouble
    .LSOverride

    #图标必须以两个\ r
    结尾图标


    #缩略图
    ._ *

    #可能出现在根的数量
    .DocumentRevisions-V100
    .fseventsd
    .Spotlight-V100
    .TemporaryItems
    。折价
    .VolumeIcon.icns

    #可能在远程AFP上创建的目录共享
    .AppleDB
    .AppleDesktop
    网络垃圾箱文件夹
    临时项目
    .apdisk


    $ b上面增加了CocoaPods,Carthage和一些随时间推移而出现的其他商品。


    I'm working on an iOS project and am using git to do version control. I'm working on this with another developer.

    Which Xcode project files should I keep in the repo and which ones can I exclude so that it doesn't affect the other developer negatively?

    Here are some of the non-code files that git is telling me has been modified or added... (BTW, these are only viewable in the OSX file manager if you "Show Package Contents" for YourProject.xcodeproj file)

    exclude ?

    • contents.xcwordspacedata (I think this is just workspace settings)
    • UserInterfaceState.xcuserstate (based on the name it seems only specific to me)
    • Breakpoints.xcbkptlist (...my breakpoints settings)

    INCLUDE ?

    • project.pbxproj (INCLUDE...project settings)
    • *.xscheme (INCLUDE...scheme definitions)
    • xschememanagement.plist (INCLUDE...scheme manager settings?)

    Does this seem right?

    (Just an FYI for those that want to use the exclude feature of git. Edit your .git/info/exclude file in your local repository. Put in the files or the patterns for files that you want git to ignore. For example, if you want git to ignore foo.temp, bar.temp you can put a line in the file that says *.temp)

    解决方案

    Think this is a great place to start 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
    

    This one I modified Xcode .gitignore I believe it to be more comprehensive.

    # 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
    

    The above adds CocoaPods, Carthage and some others that have shown up over time.

    这篇关于哪些Xcode项目文件可以从我的git repo中“排除”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆