git 常用操作

repo sync
repo start --all "local_hap"   //创建repo 分支(all)
repo forall -c "git merge origin/hw/omap/I.E2/bugfix"  //整个branch 进行merge
git fetch origin    //同步远程git仓
git merge origin/hw/omap/I.E2/bugfix   //单git 仓merge
git push origin local_hap:hw/omap/I.E2/HAP  //push到远程分支

repo forall -c "git push origin local_hap:hw/omap/I.E2/HAP"  //所有git仓push

git checout -- .     //还原git仓

git branch -a | grep E1   //查看分支

git log --oneline --decorate=full --all --graph  //查看log

git diff 单号^ 单号  //对比前后的不同

进入到/prebuild目录下,执行git stash 会把status信息暂存,再执行repo status, 要还原使用git stash pop

find ./ -name "*.mk"|xargs grep checkapi-current-timestamp  查找文件内容

一般在merge出现冲突后我们这样:

git fetch origin

git merge origin/hw/omap/I.E2/bugfix

//解决冲突 add commit

git push origin local_bugfix:hw/omap/I.E2/bugfix

//对于异常的仓可以使用

进入到/prebuild目录下,执行git stash 会把status信息暂存,再执行repo status, 要还原使用git stash pop

常用打tag方式:

git tag -m "Release 1.0" v1.0
git push origin refs/tags/v1.0

打patch方式:

git format-patch a .. b

取tag版本:

repo init -u ssh://android.huawei.com/platform/omapmanifest.git -b hw/sh/ics/omap/PreAlpha -m app_huawei_platform_ti_ics_Alpha_ti_generic_product_20111223_B005.xml --no-repo-verify --repo-branch=stable






  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值