一般都是git push 但是现在要push到一个虚拟的分支上面
Usually when you push to a remote git, you push to the reference '/refs/heads/branch', but when working with Gerrit you have to push to a virtual branch representing "code review before submission to branch". This virtual name space is known as /refs/for/<branch>
user@host:~/demo-project$ git push origin HEAD:refs/for/master Counting objects: 4, done. Writing objects: 100% (3/3), 293 bytes, done. Total 3 (delta 0), reused 0 (delta 0) remote: remote: New Changes: remote: http://localhost:8080/1 remote: To ssh://user@localhost:29418/demo-project * [new branch] HEAD -> refs/for/master user@host:~/demo-project$
然后就可以去gerrit网页上能看到这个提交了

本文介绍如何将代码推送到Gerrit进行代码审查。通常,开发者需要将更改推送到一个特殊的虚拟分支,而非直接推送到目标分支。通过特定的Git命令,可以实现这一过程,并在Gerrit平台上查看提交。
2076

被折叠的 条评论
为什么被折叠?



