Push bypasses Gerrit Code Review (TortoiseGit)

∥☆過路亽.° 提交于 2019-12-06 12:43:16

问题


I need to be able to push to a repository but using the code-review feature. To push I am using tortoisegit for this, when pushing to master I get this error:

ssh://myusername@myorganization:29418/project ! [remote rejected] master -> master (can not update the reference as a fast forward) error: failed to push some refs to ssh://myusername@myorganization:29418/project

The only way I am able to push is by adding the Push permission to the group but this bypasses the code-review. How can I set up Gerrit so that it allows me to push for review?

I wasn't the person who set this up so I am having problems to understand the required permissions, I have read the ACL documentation of Gerrit but I don't have clear what I have to do.

Thanks in advance!


回答1:


Your permissions are probably right, but you should push to refs/for/master instead of master. For example,

git push ssh://myusername@myorganization:29418/project HEAD:refs/for/master



回答2:


And if you want to bypass the gerrit review and merge any change use heads instead of for. Command will be

git push ssh://myusername@myorganization:29418/project HEAD:refs/heads/master


来源:https://stackoverflow.com/questions/14566576/push-bypasses-gerrit-code-review-tortoisegit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!