How do I set the topic from the command line when I push a new commit to gerrit?

mabraham picture mabraham · May 19, 2014 · Viewed 8.3k times · Source

When uploading a git commit for code review on Gerrit (2.8), I would like to be able to set the topic field (e.g. g-tune-pme-reform here https://gerrit.gromacs.org/#/c/3453/3). How can this be done from the command line? Can it be done in the original git push?

Answer

HiB picture HiB · May 19, 2014

yes, it is possible using the push command:

git push origin HEAD:refs/for/master/<topic_name>