git for Xcode 过滤文件.gitignore

作者: luowanglin | 来源:发表于2016-03-19 21:59 被阅读759次

    Mac ox 系统下,部分文件默认为隐藏,所以创建git仓库里的文件将不可见,可通过以下终端命令行实现 显示&隐藏

    defaults write com.apple.finder AppleShowAllFiles -bool true 显示文件

    defaults write com.apple.finder AppleShowAllFiles -bool false 隐藏文件

    .gitignore文件的作用 :告诉Git哪些文件不需要添加到版本管理中。

    创建方式:终端相应的操作目录下执行 echo -e "....."> .gitignore

    iOS开发一般通用如下操作 (复制粘贴即可):

    echo -e "# 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

    *.xcscheme

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

    # 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://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md

    fastlane/report.xml

    fastlane/screenshots"> .gitignore

    相关文章

      网友评论

        本文标题:git for Xcode 过滤文件.gitignore

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