Eric Liu
Eric Liu

Reputation: 31

How to change topic name of Gerrit via command line

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.

Upvotes: 3

Views: 3218

Answers (2)

VonC
VonC

Reputation: 1326616

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)

Upvotes: -1

Related Questions