基于Gerrit库的master分支创建tag并发布的过程详解

版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/taiyangdao/article/details/72455433

本文介绍基于Gerrit库的master分支创建tag并发布的过程。

1.在Gerrit上检查是否已有相应的Access权限
Reference: refs/tags/*
Push Annotated Tag 
Push Signed Tag 



2.从Gerrit获取默认的master分支到本地,并在本地创建annotated tag

git clone ssh://myname@gerrit.server.com:29418/myparent/myproject

cd myproject
git tag -a -m "Adding v1.0 tag" v1.0或git tag -s -m "Adding v1.0 tag" v1.0

3.提交本地的tag到Gerrit

git push origin v1.0 refs/tags/v1.0:refs/tags/v1.0
或git push origin v1.0 HEAD:refs/tags/v1.0
或git push origin v1.0
或git push origin tag v1.0
或git push origin --tags#提交本地的所有tags

user@serverhost > git tag -l
v0.0.1
v0.0.2
v0.0.3
v0.0.4
user@serverhost> git push origin --tags
Counting objects: 2, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 198 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1)
remote: Processing changes: refs: 2, done
To ssh://gerrit.server.com:29418/myparent/myproject
 * [new tag]         v0.0.3 -> v0.0.3
 * [new tag]         v0.0.4 -> v0.0.4

4.获取指定tag到本地

git clone ssh://myname@gerrit.server.com:29418/myparent/myproject

git checkout v1.0


展开阅读全文

没有更多推荐了,返回首页