繁体   English   中英

使用git describe时如何更改给定的标记?

[英]How can I change the tag given when using git describe?

我想使用“ git describe”来获取应用程序的“修订号”。 不幸的是,git存储库是使用cvs-import创建的,并且具有一个难看的旧标签,因此我想对其进行更改。

使用“ git describe”时,如何更改给定的标签?

注意:我今天在IRC上提出了这个问题,最后我自己找到了答案。 认为它对其他人也可能有用。 :)

#create a new anotated tag because by default git describes only looks for those
git tag -a NEWTAG

#push the new tags to the remote repository
git push --tags

cf: http : //www.kernel.org/pub/software/scm/git/docs/git-describe.html

您可能对此也很感兴趣: 如何通过Qt项目文件将命令的输出作为编译器标志传递?

git describe现在支持--match选项,该选项可以过滤将要选择的标签

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM