gpt4 book ai didi

git - git push to gerrit repo时如何获取gerrit code review链接

转载 作者:行者123 更新时间:2023-12-05 07:55:01 25 4
gpt4 key购买 nike

我正在尝试设置 Gerrit 代码审查服务器。我已经安装了 gerrit 服务器,我可以在我的本地主机上访问它 localhost:8080我还安装了 gerrit git review 。提交文件更改后,当我执行 git push origin master 时,我得到了这个

dev> git push origin master
Counting objects: 17, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 621 bytes | 0 bytes/s, done.
Total 6 (delta 3), reused 0 (delta 0)
remote: Resolving deltas: 100% (3/3)
remote: Processing changes: refs: 1, done
To ssh://newbie@localhost:29418/dev.git
ac19936..de7d7ea master -> master

当我执行 git review 时,我得到了这个

dev> git review
remote: Resolving deltas: 100% (1/1)
remote: Processing changes: new: 1, refs: 1, done
remote:
remote: New Changes:
remote: http://localhost:8080/6 this is a check on gerrit code review with git review
remote:
To ssh://newbie@localhost:29418/dev.git
* [new branch] HEAD -> refs/publish/master

只有当我执行 git review 时,我才会获得链接 http://localhost:8080/6 到本地主机上的代码审查。即使我执行 git push ,我也想获得该代码审查链接。我怎样才能得到它?谁能帮帮我

最佳答案

git push gerrit HEAD:refs/publish/master

这解决了我的问题。我在运行 git review -v 时得到了这个解决方案这显示了在审查过程中运行的所有命令。

dev> git review -v
2015-05-26 12:59:32.789433 Running: git log --color=never --oneline HEAD^1..HEAD
2015-05-26 12:59:32.794065 Running: git remote
2015-05-26 12:59:32.797142 Running: git branch -a --color=never
2015-05-26 12:59:32.800575 Running: git rev-parse --show-toplevel --git-dir
2015-05-26 12:59:32.803797 Running: git remote update gerrit
Fetching gerrit
2015-05-26 12:59:32.870035 Running: git rev-parse HEAD
2015-05-26 12:59:32.873419 Running: git show-ref --quiet --verify refs/remotes/gerrit/master
2015-05-26 12:59:32.876519 Running: git rebase -p -i remotes/gerrit/master
2015-05-26 12:59:33.637414 Running: git reset --hard 5e0c601b83d598a52c8234d4ef4213acce824dea
2015-05-26 12:59:33.745906 Running: git config --get color.ui
2015-05-26 12:59:33.749583 Running: git log --color=always --decorate --oneline HEAD --not --remotes=gerrit
2015-05-26 12:59:33.754085 Running: git branch --color=never
2015-05-26 12:59:33.757454 Running: git log HEAD^1..HEAD
Using local branch name "master" for the topic of the change submitted
2015-05-26 12:59:33.766298 Running: git push gerrit HEAD:refs/publish/master
remote: Resolving deltas: 100% (2/2)
remote: Processing changes: new: 1, refs: 1, done
remote:
remote: New Changes:
remote: http://localhost:8080/7 another checking for checking git review
remote:
To ssh://newbie@localhost:29418/dev.git
* [new branch] HEAD -> refs/publish/master
2015-05-26 12:59:34.139211 Running: git rev-parse --show-toplevel --git-dir

关于git - git push to gerrit repo时如何获取gerrit code review链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30452184/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com