如何将标签推送到gerrit中的特定分支 [英] How to push tag to specific branch in gerrit

查看:112
本文介绍了如何将标签推送到gerrit中的特定分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在gerrit中有一个叫做 v2.0 的分支。现在我想把这个分支的当前状态定义为 v2.0.1



在我的本地存储库中,分支,然后添加标签使用

  git tag v2.0.1 

现在我试图将它推向gerrit,但我不知道如何。我试过这个:

  $ git push origin v2.0.1 HEAD:refs / heads / v2.0 
! [远程拒绝] v2.0.1 - > v2.0(Gerrit禁止)

如何将标签推送到gerrit?

解决方案

经过一些Google搜索后,我找到了答案:

gerrit 只接受带注释的标签。创建并推送带注释的标记非常简单:

  git checkout v2.0 
git tag -am添加v2.0.1 tagv2.0.1
git push origin v2.0.1 HEAD:refs / heads / v2.0


I have a branch called v2.0 in gerrit. Now I want to the current stat of this branch as v2.0.1.

In my local repository I checked out the branch, then added the tag using

git tag v2.0.1

Now I'm trying to push that to gerrit, but I'm not sure how. I tried this:

$ git push origin v2.0.1 HEAD:refs/heads/v2.0
! [remote rejected] v2.0.1 -> v2.0 (prohibited by Gerrit)

How can I push the tag to gerrit?

解决方案

After some googling, I found the answer:

gerrit accepts only annotated tags. It's quite straightforward to create and push an annotated tag:

git checkout v2.0
git tag -am "Adding v2.0.1 tag" v2.0.1
git push origin v2.0.1 HEAD:refs/heads/v2.0

这篇关于如何将标签推送到gerrit中的特定分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆