iOS 配置.gitignore文件詳細(xì)介紹
iOS 配置.gitignore文件詳細(xì)介紹
為什么要配置.gitigore
在我們使用git的過(guò)程當(dāng)中,不是任何文件都需要commit到本地或者遠(yuǎn)程倉(cāng)庫(kù)的,比如一些三方庫(kù)文件。
那么作為一個(gè)git新手,很多人不知道如何配置.gitignore文件,本文只是提供一個(gè)便捷的例子。你可以直接使用本文提供的代碼編輯到你的.gitigore文件中。
簡(jiǎn)便配置
直接復(fù)制下面的內(nèi)容到你的.gitignore文件即可。注意,這個(gè)配置是給iOS開(kāi)發(fā)者使用的。
# Xcode .DS_Store */build/* *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata profile *.moved-aside DerivedData .idea/ *.hmap *.xccheckout *.xcworkspace !default.xcworkspace #CocoaPods Pods !Podfile !Podfile.lock
到gitignore.io去選擇自定義配置
在 gitignore.io 輸入你需要配置的語(yǔ)言,會(huì)幫助你自動(dòng)生成一份配置。比如,輸入Objective-C和Swift會(huì)幫助你生成下面的配置。
# Created by https://www.gitignore.io/api/objective-c,swift ### Objective-C ### # 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 *.moved-aside *.xcuserstate ## 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/fastlane/docs/Gitignore.md fastlane/report.xml fastlane/screenshots ### Objective-C Patch ### *.xcscmblueprint ### Swift ### # 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 *.moved-aside *.xcuserstate ## Obj-C/Swift specific *.hmap *.ipa ## 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/ .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/ # 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/fastlane/docs/Gitignore.md fastlane/report.xml fastlane/Preview.html fastlane/screenshots fastlane/test_output
這個(gè)配置自動(dòng)生成了很多注釋和一些不太必要的配置,所以直接使用上面提供的簡(jiǎn)便配置就好。
感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!
相關(guān)文章
Swift 2.1 為 UIView 添加點(diǎn)擊事件和點(diǎn)擊效果
本文主要介紹 Swift UIView,這里給大家提供代碼示例作為參考為UIView 添加點(diǎn)擊事件和點(diǎn)擊效果,希望能幫助IOS開(kāi)發(fā)的同學(xué)2016-07-07iOS如何開(kāi)發(fā)簡(jiǎn)單的手繪應(yīng)用實(shí)例詳解
這篇文章主要給大家介紹了關(guān)于iOS如何開(kāi)發(fā)簡(jiǎn)單的手繪應(yīng)用的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2020-09-09iOS實(shí)現(xiàn)輸入框跟隨鍵盤(pán)自動(dòng)上移的實(shí)例代碼
本篇文章主要介紹了iOS實(shí)現(xiàn)輸入框跟隨鍵盤(pán)自動(dòng)上移的實(shí)例代碼,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2017-04-04iOS中的二級(jí)菜單及Cell的展開(kāi)收起示例
本篇文章主要介紹了iOS中的二級(jí)菜單及Cell的展開(kāi)收起示例,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下。2017-08-08