iOS 项目添加gitignore 文件

iOS 项目添加gitignore 文件,第1张

gitignore文件用于忽略无需追踪的文件 

gitignore 文件中添加内容

.DS_Store

.svn

profile

*.moved-aside

#CocoaPods

Pods/

!Podfile

!Podfile.lock

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

*.xcworkspace

!default.xcworkspace

DerivedData

.idea

## Obj-C/Swift specific

*.hmap

*.ipa

一、项目还未上传至Git

cd 当前项目文件夹

git init

git remote add origin http://gitlab. xx/xx/xx.git  (git目录)

vim .gitignore

(文件中加入上面gitignore 文件内容)

git add .

git commit -m "Initial commit"

git push -u origin master

二、项目已上传至Git 添加gitignore

cd 项目文件名

git pull

vim .gitignore (文件中加入上面gitignore 文件内容)

按esc ->shift+zz 退出

git rm -r --cached .  

git add .

git commit -m "add ignore"

git push

1.在target -->build Phases 左侧点击 +

2.选中Run Script

4.将.sh文件路径添加到Run Script里

当然此时如果直接编译,可以还会报以下错误:

chmod 修改权限

a 所有用户

收工~


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/bake/11550250.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-16
下一篇 2023-05-16

发表评论

登录后才能评论

评论列表(0条)

保存