代码回归

 

把A分支的代码同步到B分支或者依据A分支拉B分支:

repo init下载A分支代码:

  1.所有的库切换到A分支:repo forall -c "git checkout  remotes/zsgit/A"
  2.创建临时temp分支:repo forall -c "git checkout -b temp"
  3.把temp分支上传到新分支:repo forall -c "git push -f zsgit temp:B"

注意点:gerrit主机名称不一样,这里是zsgit,可以进到一个库下面,git remote -v 查看

用msm8953/y3o/dev流覆盖msm8953/y3o/tmp流
cd /home/coolyota/projects/Y3O-FullBuild/code
#reset code
.repo/repo/repo forall -c "git clean -fd;git checkout msm8953/y3o/dev;git reset --hard;git pull --rebase"
#cover  msm8953/y3o/tmp
.repo/repo/repo forall -c "git push -f yota HEAD:refs/heads/msm8953/y3o/tmp"

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章