如何归档旧的git标签? [英] How can I archive old git tags?

查看:65
本文介绍了如何归档旧的git标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的git储存库中有一些不再重要的旧标签.我想将标签归档,以便在运行git tag时默认情况下不显示它们.我不想删除它们,因为我想保留历史记录.我该怎么办?

I have some old tags in my git repository that are no longer important. I would like to archive the tags so that they don't show up by default when running git tag. I don't want to delete them, because I want to keep the history. How can I do this?

推荐答案

克隆存储库,将标签保留在备份中,然后从您正在使用的标签中删除它们.

Clone the repo, leave the tags in the backup, then delete them from the one you are working in.

(请注意,@ AndrewC在对问题的评论中写下了该答案,但它被视为对问题的答案.)

(Note that @AndrewC wrote this answer in a comment to the question, but it counts as an answer to the question.)

这篇关于如何归档旧的git标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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