多仓相关操作:
pod lib create demo
cd demo
新建远端仓库
git remote set-url origin http://192.168.31.7:7990/scm/per/demo.git
git remote add origin origin http://192.168.31.7:7990/scm/per/demo.git
git status
git add .
git commit -m ‘demo’
git push -u origin master
git tag 0.1.0
git push -—tags
(pod lib lint,验证本地的)
pod spec lint demo.podspec --verbose --allow-warnings --sources='ssh://git@192.168.31.7:7999/swclien/modulespecs.git,https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
(--source:需要加上地址,因为可能中间存在依赖,当依赖找不到的时候,就不会生成podspace,pod lib lint报错)
(--skip-import-validation,跳过一些验证,比如缺失arm64架构等)
pod repo push 31-swclien-modulespecs A4xBaseExtensionKit.podspec —-verbose —-allow-warnings
pod repo update 更新本地的仓库(pod install、pod lib lint都会先取本地的代码版本)
tag操作:
查看本地tag:git tag
增加本地tag:git tag 1.6
删除本地tag:git tag -d 1.6
增加远端tag:git push origin tag 1.6
删除远端tag:git push origin tag -d 1.6
切分支操作:(在当前分支有代码更新还没有提交,但是想提交到另一个分支上)
git remote set-url origin http://192.168.31.7:7990/scm/ios_module/a4xbaseextensionkit.git
git remote -v
git fetch
git checkout develop
git status
git checkout -b feature/add_link_sdk_module
git add .
git commit -m 'feature: add link sdk module'
git push --set-upstream origin feature/add_link_sdk_module 第一次提交需要,后面直接push
git push origin develop把本地分支推送到远端
git cherry-pick <header>
pod repo remove ModuleSpecs 移除本地的仓库
代码冲突:
拉冲突:
git stash
git pull
git stash pop
解决冲突:
code podfile.lock
网友评论