git命令
git remote add origin xxxx 创建本地分支
git add . 添加到缓存
git commit -m ‘打上标签’
git commit --amend 打上标签的文本的修改
git checkout -b xxx 切换并创建分支
git push origin feature 提交分支
git clone -b dev 代码仓库地址 拉取远程指定分支
git remote update origin --prune 更新远程分支操作
git pull 拉取最新内容
git tag 使用
git tag //创建本地tag
git push origin //推送到远程仓库
若存在很多未推送的本地标签,你想一次全部推送的话:
git push origin --tags
本地 tag 的删除:
git tag -d
远程 tag 的删除:
git push origin :refs/tags/
如下所示:
$ git tag -d 12345 #删除本地记录
$ git push origin :refs/tags/12345 #删除远程记录
git commit 回退版本
$ git reset --hard HEAD^ 回退到上个版本
$ git reset --hard HEAD~3 回退到前3次提交之前,以此类推,回退到n次提交之前
$ git reset --hard commit_id 退到/进到 指定commit的sha码
查询项目是否存在 uiwebview
grep -r UIWebView .
批量修改文件png jepg 的图片hash值
- 安装 brew
- 安装 ImageMagick:brew install imagemagick
- 压缩工程目录下所有 png 文件:find . -iname “*.png” -exec echo {} ; -exec convert {} {} ;