[英]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.