gerrit的第一次提交记录
来源:互联网 发布:php安装教程 linux 编辑:程序博客网 时间:2024/06/05 09:56
$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: Resolving deltas: 100% (3/3)
remote: Processing changes: refs: 1, done
remote: ERROR: [dc09195] missing Change-Id in commit message footer
remote:
remote: Hint: To automatically insert Change-Id, install the hook:
remote: gitdir=$(git rev-parse --git-dir); curl -o ${gitdir}/hooks/commit-msg https://web.toutiao.com/lib/infosys/download/software/commit-msg; chmod a+x ${gitdir}/hooks/commit-msg
remote: And then amend the commit:
remote: git commit --amend
remote:
To https://xxx
! [remote rejected] HEAD -> refs/for/obsolescenceL ([dc09195] missing Change-Id in commit message footer)
error: 无法推送一些引用到 'https://xxx'
#ok有hint了,照着hint做
$git rev-parse --git-dir
xxx
$curl -o xxx/hooks/commit-msg https://web.toutiao.com/lib/infosys/download/software/commit-msg; chmod a+x ${gitdir}/hooks/commit-msg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4360 100 4360 0 0 7324 0 --:--:-- --:--:-- --:--:-- 7315
$git push origin HEAD:refs/for/obsolescenceL
#这回就成功啦
remote: Resolving deltas: 100% (3/3)
remote: Processing changes: new: 1, refs: 1, done
remote:
remote: New Changes:
remote: https://xxx/gerrit/161 feat: complete the 1st, 2nd and 3rd problem
remote:
To https://xxx
* [new branch] HEAD -> refs/for/obsolescenceL
- gerrit的第一次提交记录
- 记录Gerrit的使用
- Gerrit 提交commit
- gerrit 代码提交
- cherry-pick gerrit 上的提交到另一个分支
- 如何在gerrit中修改已提交的change
- gerrit 删除废弃的提交(Abandoned commit change)
- gerrit 删除废弃的提交(Abandoned commit change)
- Gerrit 提交更改到gerrit服务器
- 第一次的记录
- CSDN的第一次记录
- 我的第一次记录
- 第一次的比赛记录
- 向GitHub的第一次提交
- git+gerrit 自用记录
- gerrit+gitlab出错记录
- gerrit 常用命令记录
- Gerrit如何提交大量代码
- IO流知识,模拟试用版软件
- 信号 核心转储 gdb调试
- 从键盘输入接收一个文件夹路径,打印出该文件夹下所有的.java文件名
- 垃圾电话能罚多狠?这个人被罚1.2亿美元
- 闲话架构师的职责
- gerrit的第一次提交记录
- CRC校验
- 整合输入流
- ll.bat
- 内存输出流
- 两年Java程序员面试经
- tomcat内存溢出设置
- 序列化:将对象写到文件上
- 对象输入流,反序列化