代碼迴歸

 

把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"

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