2013年7月15日 星期一

get source code from server

  • server擷取source code:
repo init -u git://robot/myandroid10.4/platform/manifest -b CV7200
repo sync

  • checkout cv7600_board_up branch
repo forall -pc 'git checkout cv7600_board_up'

create git branch

Create 一個新的branch的相關操作:
1. 先在local端製作一個新的branch
git branch CV7310

2. 切換到該branch上
git checkout CV7310

3. 檢查新的branch的名稱是不是跟遠端的server裡面有重複
git branch -r

4. 把新的branch放到遠端server上面
git push aosp CV7310

5. 確認該branch已經放到server上面了
git branch -r

6. 將local端的git 跟遠端上server的code作關連的動作 (這樣做的目的是讓local可以作 git pull push fetch...的動作)
git branch --set-upstream CV7310 aosp/CV7310

7. 跟遠端的server作同步的動作
git fetch
git pull


附註:
刪除一個遠端的branch
git push aosp :CV7310
可以參考查克的部落格
http://mygitcommand.blogspot.tw/2011/04/make-existing-git-branch-track-remote.html