美文网首页
Xcode工程忽略文件.gitignore史上最全

Xcode工程忽略文件.gitignore史上最全

作者: Triumphant | 来源:发表于2021-04-09 11:29 被阅读0次

    # Xcode

    #

    # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore

    ## User settings

    xcuserdata/

    ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)

    *.xcscmblueprint

    *.xccheckout

    ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)

    build/

    DerivedData/

    *.moved-aside

    *.pbxuser

    !default.pbxuser

    *.mode1v3

    !default.mode1v3

    *.mode2v3

    !default.mode2v3

    *.perspectivev3

    !default.perspectivev3

    ## Obj-C/Swift specific

    *.hmap

    ## Xcode Patch

    *.xcodeproj/*

    !*.xcodeproj/project.pbxproj

    !*.xcodeproj/xcshareddat

    !*/xcuserdata/admin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlista/

    !*.xcworkspace/contents.xcworkspacedata

    /*.gcno

    ## App packaging

    *.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/

    Podfile.lock

    #

    # Add this line if you want to avoid checking in source code from the Xcode workspace

    # *.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/**/*.png

    fastlane/test_output

    # Mac OS X Finder and whatnot

    .DS_Store

    .gitignore规则不生效

    .gitignore只能忽略那些原来没有被track的文件,如果某些文件已经被纳入了版本管理中,则修改.gitignore是无效的。

    解决方法就是先把本地缓存删除(改变成未track状态),然后再提交:

    进入项目对应路径后

    git rm -r --cached .

    git add .

    git commit -m 'update .gitignore'

    注:https://github.com/github/gitignore/blob/master/Objective-C.gitignore

    相关文章

      网友评论

          本文标题:Xcode工程忽略文件.gitignore史上最全

          本文链接:https://www.haomeiwen.com/subject/zebrjktx.html