submit the commit to girrit system

本文介绍了如何使用Gerrit代码审查系统进行代码提交及审查的过程。包括注册账户、配置SSH密钥、推送提交到Gerrit服务器的具体步骤,并强调了在提交前正确配置commit消息的重要性。

# Gerrit review system
1. If you don't have gerrit account, please visit http://achenserver:8080/ and register your own account by Register link (upper right corner). 
   It supports Yahoo Open ID. If you don't have please register one on http://openid.yahoo.com/
2. After logon gerrit, add your ssh public key into Settings->SSH Public Keys
3. Then you are ready to push your commit. Go to your project folder and make sure your modification is committed locally.
4. For example, I have a commit under frameworks/av and what to be reviewed. You should know the project name firstly.

achen@TpeSwBuildMachine:~/Project/Z580/frameworks/av$ git config --list | grep url
remote.aosp.url=git://tpeswbuildmachine.pixelworks.com/aosp/platform/frameworks/av

The format of this git project name is git://[hostname]/[project name]
[hostname] = tpeswbuildmachine.pixelworks.com
[project name] = aosp/platform/frameworks/av

The command to push your commit will be
git push ssh://hdzhu@achenserver.pixelworks.com:29418/[project name] HEAD:refs/for/[branch name]
git push ssh://hdzhu@achenserver.pixelworks.com:29418/aosp/platform/packages/apps/Settings HEAD:refs/for/qcom_8x94_04510
git push ssh://hdzhu@achenserver.pixelworks.com:29418/pxlw/vendor/pixelworks/IrisService HEAD:refs/for/qcom_8x94_04510

git push ssh://chlin@achenserver.pixelworks.com:29418/aosp/platform/frameworks/av HEAD:refs/for/qcom_8x94_04510    <--- check the project name and refs head with command: git config --list
Then, you will see your commit is pushed to gerrit review system (http://achenserver:8080/

Be noted, gerrit system uses commit-message hook to formalize its commit content, please call following command before you commit

gitdir=$(git rev-parse --git-dir); sudo scp -p -P 29418 hdzhu@achenserver:hooks/commit-msg ${gitdir}/hooks/

If your commit is already created, please call
git commit --amend 

to format the git message again.

So the all command as following.

gitdir=$(git rev-parse --git-dir); scp -p -P 29418 hdzhu@achenserver:hooks/commit-msg ${gitdir}/hooks/
git add .
git commit -m ""
git commit --amend
git config --list | grep url
git push ssh://hdzhu@achenserver.pixelworks.com:29418/pxlw/vendor/pixelworks/IrisService HEAD:refs/for/qcom_8x94_04510_iris2_40p
git push ssh://hdzhu@achenserver.pixelworks.com:29418/aosp/platform/packages/apps/Settings HEAD:refs/for/qcom_8x94_04510_iris2_40p
git push ssh://hdzhu@achenserver.pixelworks.com:29418/aosp/platform/frameworks/native HEAD:refs/for/qcom_8x94_04510_iris2_40p
git push ssh://hdzhu@achenserver.pixelworks.com:29418/codeaurora/platform/vendor/qcom/plutonium HEAD:refs/for/qcom_8x94_04510_iris2_40p

git push ssh://hdzhu@achenserver.pixelworks.com:29418/codeaurora/kernel/msm-3.10 HEAD:refs/for/qcom_8x94_04510_iris2_40p

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值