美文网首页
iOS 忽略pod文件,仅上传Podfile

iOS 忽略pod文件,仅上传Podfile

作者: _蓝星 | 来源:发表于2019-05-23 15:18 被阅读0次
  • 开启终端,CD进入到工程目录下,使用

touch .gitignore

  • 新建.gitignore文件,然后使用

open .gitignore

  • 在打开的.gitignore文件中粘贴下列代码(在gitignore.io中输入相关语言可以生成),然后保存退出。
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
# Mac OS X Finder and whatnot
.DS_Store
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xcuserstate
*.xccheckout
## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
#CocoaPods
Pods/

最后面的 #CocoaPods
Pods/
是我们指定忽略pod文件。
如果文件内容有需要上传的文件,将其注释;或有新的不需要上传的文件类型,同样可以直接添加到里边。

  • 然后上传代码就行了。

相关文章

网友评论

      本文标题:iOS 忽略pod文件,仅上传Podfile

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