简体   繁体   中英

How can I push a commit in gerrit branch locally with topic branch and reviewers

For eg, I have two branches in my Gerrit

helen/test1
helen/test2

We usually use the below command to push the commit to remote with reviewers and topic.

git push origin HEAD:refs/for/test2%topic=drive,r=helen@o.com

How can I do the above locally

You can't do that.

Only Gerrit can "understand" correctly the "refs/for" branch prefix and the "%topic=drive,r=helen@o.com" branch suffix. The prefix tells Gerrit that you want to create a change review and the suffix says you want to set the topic name and add a reviewer to the change. Git itself doesn't know anything about these configurations and it will mess with your push command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM