时间:2021-05-02
iOS 配置.gitignore文件详细介绍
为什么要配置.gitigore
在我们使用git的过程当中,不是任何文件都需要commit到本地或者远程仓库的,比如一些三方库文件。
那么作为一个git新手,很多人不知道如何配置.gitignore文件,本文只是提供一个便捷的例子。你可以直接使用本文提供的代码编辑到你的.gitigore文件中。
简便配置
直接复制下面的内容到你的.gitignore文件即可。注意,这个配置是给iOS开发者使用的。
? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 # 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 输入你需要配置的语言,会帮助你自动生成一份配置。比如,输入Objective-C和Swift会帮助你生成下面的配置。
? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 # 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这个配置自动生成了很多注释和一些不太必要的配置,所以直接使用上面提供的简便配置就好。
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
原文链接:http://www.jianshu.com/p/35780446b133
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
如果不配置.gitignore的文件,带push代码的时候就会把一写不必要的文件push到远程仓库,如.idea文件。如果不小心出现此文件在远程仓库可以通过一下
gitignore是什么文件就是git软件要忽略的文件列表,如果要忽略某些文件,,在Git工作区的根目录下创建一个特殊的.gitignore文件,然后把要忽略的
IISExpress配置允许外部访问详细介绍1.找到IISExpress的配置文件,位于/IISExpress/config文件夹下,打开application
偶然遇到的问题,记录如下:通常我们在push项目时,会有些配置文件或本地文件不想上传到服务器上这时候我们会通过设置.gitignore文件一般设置成这样:###
前言本文主要介绍了关于让VIM支持Nginx.conf文件语法高亮显示功能的方法,下面话不多说,来一起看看详细的介绍吧。我们在编辑配置Nginx的配置文件(.c