git流程

  • 首次获取代码

1.sign-in gerrit (only for the very first time)

  Command of adding new generated ssh key: ssh-add ~/.ssh/id_rsa

2.Modify the user.name of git.

  Command: git config --global user.name <your_ldap_account>

3.repo init -u ssh://<your_ldap_account>@216.224.176.142:29418/gmpoc/manifest -m gmpoc.xml

4.repo sync (at the code root path)

git提交:

1.repo sync . 或者 repo sync

2.git checkout -b <branchname>

3.手动解决冲突,比如用meld工具

4.git diff HEAD

5.git add .

6.git commit

7.git push XX <branchname>:refs/for/XX

e.g: git push gmpoc gm-562:refs/for/gmpoc-maindev

提交有冲突:

1.repo sync

2.git checkout <branchname>

3.git rebase XX/XX

e.g: git rebase gmpoc/gmpoc-maindev

4.git push XX <branchname>:refs/changes/XX

e.g: git push gm <your_local_branch_name>:refs/changes/<the_change_id_on_Gerrit>

 

 

posted @ 2013-02-02 15:55  qiangzhu  阅读(265)  评论(0编辑  收藏  举报