We can set initial topic name by: git push origin HEAD:refs/heads/master/topic_name But I wonder how could I change the topic name via command line later on? Thanks in advance.
Asked
Active
Viewed 2,616 times
2 Answers
2
You can set the topic using REST
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#set-topic

Marcelo Ávila de Oliveira
- 19,950
- 3
- 39
- 50
-1
Simply push your local branch under a different name:
git push <remote> <remote>/<old_name>:refs/heads/<new_name> :<old_name>
In your case:
git push origin HEAD:refs/heads/master/<new_name> :refs/heads/master/topic_name
Here, you push:
- your local branch under a new remote name
- "nothing" to the old branch (which is then deleted)
-
1Thanks. Is there any way just using gerrit command instead of using git push, consider you don't have repo cloned locally. – Eric Liu Jun 17 '16 at 11:14