ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [Git] .gitignore ํŒŒ์ผ ์ƒ์„ฑํ•˜๊ธฐ
    Git 2022. 1. 9. 22:30

    .gitignore ํŒŒ์ผ์€ git์—์„œ ํŠน์ • ํŒŒ์ผ์„ ์ถ”์ ๋˜์ง€ ์•Š๋Š” ์ƒํƒœ๋กœ ์œ ์ง€ํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ•œ๋‹ค.

    ์ฆ‰, git์— ํฌํ•จ์‹œํ‚ค์ง€ ์•Š์„ ํŒŒ์ผ์„ ์„ค์ •ํ•  ๋•Œ ์‚ฌ์šฉํ•˜๋Š”๋ฐ

    ๋ณดํ†ต ์‹คํ–‰ ํŒŒ์ผ, ๋กœ๊ทธ ํŒŒ์ผ, ๋ฌธ์„œ ํŒŒ์ผ, ํŒจํ‚ค์ง€ ํŒŒ์ผ ๋“ฑ์„ ํฌํ•จ์‹œ์ผœ์ค€๋‹ค.

     

     

    ์ด์ œ ํŒŒ์ผ์„ ์ƒ์„ฑํ•ด๋ณด๋„๋ก ํ•˜์ž.

     

     

    ๋จผ์ € ์•„๋ž˜ ์‚ฌ์ดํŠธ์— ์ ‘์†ํ•œ๋‹ค.

     

    gitignore.io

    Create useful .gitignore files for your project

    www.toptal.com

     

    ์•„๋ž˜ ์‚ฌ์ง„์ฒ˜๋Ÿผ Swift, Xcode, CocoaPods๋ฅผ ์ž…๋ ฅํ•˜๊ณ  ํŒŒ์ผ์„ ์ƒ์„ฑํ•œ๋‹ค.

     

     

     

     

    ์ƒ์„ฑ ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด, ์•„๋ž˜์™€ ๊ฐ™์€ ํŒŒ์ผ์ด ์ƒ์„ฑ๋˜๋Š”๋ฐ ์ด๋ฅผ ์ „๋ถ€ ๋ณต์‚ฌํ•œ๋‹ค.

     

     

    ํŒŒ์ผ ๋‚ด์šฉ์€ ๋ฐ‘์— ํด๋ฆญ!

    ๋”๋ณด๊ธฐ

    .gitignore

    # Created by https://www.toptal.com/developers/gitignore/api/swift,xcode,cocoapods
    # Edit at https://www.toptal.com/developers/gitignore?templates=swift,xcode,cocoapods
    
    ### CocoaPods ###
    ## CocoaPods GitIgnore Template
    
    # CocoaPods - Only use to conserve bandwidth / Save time on Pushing
    #           - Also handy if you have a large number of dependant pods
    #           - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE
    Pods/
    
    ### Swift ###
    # Xcode
    #
    # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.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
    
    ## App packaging
    *.ipa
    *.dSYM.zip
    *.dSYM
    
    ## Playgrounds
    timeline.xctimeline
    playground.xcworkspace
    
    # Swift Package Manager
    # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
    # Packages/
    # Package.pins
    # Package.resolved
    # *.xcodeproj
    # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
    # hence it is not needed unless you have added a package configuration file to your project
    # .swiftpm
    
    .build/
    
    # 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/
    # 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/
    
    # Accio dependency management
    Dependencies/
    .accio/
    
    # 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
    
    # Code Injection
    # After new code Injection tools there's a generated folder /iOSInjectionProject
    # https://github.com/johnno1962/injectionforxcode
    
    iOSInjectionProject/
    
    ### Xcode ###
    # Xcode
    # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
    
    
    
    
    ## Gcc Patch
    /*.gcno
    
    ### Xcode Patch ###
    *.xcodeproj/*
    !*.xcodeproj/project.pbxproj
    !*.xcodeproj/xcshareddata/
    !*.xcworkspace/contents.xcworkspacedata
    **/xcshareddata/WorkspaceSettings.xcsettings
    
    # End of https://www.toptal.com/developers/gitignore/api/swift,xcode,cocoapods

     

     

     

     

    ํŒŒ์ผ์„ ๋ณต์‚ฌํ•œ ํ›„์—, ํ„ฐ๋ฏธ๋„์—์„œ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ด์„œ vi ํŽธ์ง‘๊ธฐ๋กœ ๋“ค์–ด๊ฐ„๋‹ค.

    vi .gitignore

     

     

    ํŒŒ์ผ์ด ์—ด๋ฆฌ๋ฉด, i ํ‚ค๋ฅผ ๋ˆŒ๋Ÿฌ์„œ INSERT ๋ชจ๋“œ๋กœ ๋ฐ”๊พผ ํ›„์— ํŒŒ์ผ์„ ํŽธ์ง‘ํ•˜๋ฉด ๋œ๋‹ค.

     

    ๋ณต์‚ฌํ•œ ํŒŒ์ผ์„ ๋ถ™์—ฌ๋„ฃ๊ธฐํ•œ ํ›„์— ESCํ‚ค๋ฅผ ๋ˆŒ๋Ÿฌ์„œ ์ž…๋ ฅ์„ ๋ฉˆ์ถ”๊ณ , :wq!๋ฅผ ์ž…๋ ฅํ•˜์—ฌ ํŽธ์ง‘๊ธฐ๋ฅผ ์ข…๋ฃŒํ•œ๋‹ค.

     

    ์—ฌ๊ธฐ๊นŒ์ง€ ์™„๋ฃŒํ•˜๋ฉด .gitignore ํŒŒ์ผ ์ถ”๊ฐ€๊ฐ€ ์™„๋ฃŒ๋œ๋‹ค.

    ๋Œ“๊ธ€

Designed by Tistory.