gerrit的第一次提交记录

本文详细记录了使用Gerrit进行初次代码提交的过程,包括遇到的权限问题、Change-Id缺失的错误以及如何解决这些问题。通过安装commit-msg钩子并修正提交消息,最终成功将代码推送到Gerrit进行审核。
摘要由CSDN通过智能技术生成

$git push origin obsolescenceL

#这样当然是不成功的啦蛤蛤,没有push权限的

$git push origin HEAD:refs/heads/obsolescenceL

#这样,其实也是不对的蛤蛤蛤

#以上两个,大概会出来类似以下的报错


remote: Resolving deltas: 100% (3/3)
remote: Branch refs/heads/obsolescenceL:
remote: You are not allowed to perform this operation.
remote: To push into this reference you need 'Push' rights.
remote: User: obsolescenceL
remote: Please read the documentation and contact an administrator
remote: if you feel the configuration is incorrect
remote: Processing changes: refs: 1, done    
To https://xxx
 ! [remote rejected] HEAD -> obsolescenceL (prohibited by Gerrit)
error: 无法推送一些引用到 'https://xxx'

$git push origin HEAD:refs/for/obsolescenceL

#这个像样一点了

#gerrit相对于git提供了一个特有的命名空间"refs/for/"用来定义我们的提交上传到哪个branch,且可以用来区分我们的commit是提交到gerrit进行审核还是直接提交到git仓库

#但还是报错的


remote: R

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值