Github 公有库笔记

2019/12/13 20:13 补充:本地仓库关联到远程仓库

//创建本地仓库
pod lib create * 

// 关联远程仓库
git remote add origin  *

// track master
git branch --set-upstream-to=origin/master master

(暴力方法:如果一直关联失败,可以克隆远程仓库到本地,用远程仓库 git 替换  本地仓库 git)

// 若有创建 lisence 和 readme 文件,可能冲突
git push --force --all

2018.10.16 09:16

cd  NNUtils
pod spec create NNUtils

//拖入代码 ,修改spec,提交到git
pod lib lint --allow-warnings

pod trunk register [email protected] 'shang1219178163' --description=“CocoaPods lib."
pod trunk me

//添加版本
git tag -a 1.1.1 -m ‘1.0’ 
git push origin --tags

pod spec lint --allow-warnings --use-libraries
pod spec lint --verbose --use-libraries

pod trunk push NNUtils.podspec --allow-warnings

———————————————————————————————
//补充命令
pod cache clean --all
pod trunk delete PODNAME VERSION
pod trunk deprecate PODNAME

git tag -d
git remote -v

pod update --no-repo-update
pod update BNKit --no-repo-update
pod update --verbose --no-repo-update
———————————————————————————————

//注意:
1.pod spec lint --allow-warnings 拉取的库的是.podspec文件中源为s.source的值路径,版本为s.version的值得版本
(一般更新库应该先修改s.version值,然后添加版本git tag,最后执行pod spec lint --allow-warnings)

2.我们平时点击Clone or download->Download Zip就是下载的包含了源码,和Demo代码,比较大。后两个是源码,不含Demo。
后面两个压缩方式格式不同,.zip格式用于windows,tar.gz 格式多用于 Unix/linux MacOS 系统。

3.提交代码到公有库的时候经常出现之前有的代码删除之后,新提交的没有,但是pod spec lint 的时候显示老代码报错,
一直不通过,此时创建新tag,并把.podspec文件里的s.version改为tag的版本值即可.

NNCategoryPro

你可能感兴趣的:(Github 公有库笔记)