简体   繁体   English

如何删除链接存储库中的git remote标签?

[英]How to delete a git remote tag in linked repository?

I am having Development, Staging & Production repository. 我正在开发,暂存和生产资料库。

Cycle: Development --> Staging --> Production 周期:开发->分期->生产

Development remote: origin 开发远程:起源

Staging remote: Development & origin 远程登台:发展与起源

Production remote: Staging & origin 远程制作:暂存和原始

is it possible to remove git tag from all this 3 repository in single git command? 是否有可能在单个git命令中从所有这3个存储库中删除git标签? if yes than how? 如果可以,怎么办?

You can not do it using single command as all three are separate repositories. 您不能使用单个命令来完成此操作,因为这三个都是独立的存储库。

To remove deleted tag you can use following steps: 要删除已删除的标签,您可以使用以下步骤:

Step 1: First of all remove tag from Development repository: 第1步:首先从开发存储库中删除标签:

git tag -d tag-name

Step 2: push to Development origin : 第2步:推动开发起源:

git push origin :refs/tags/tag-name

Step 3: Now run following commands in Staging and Production repository : 步骤3:现在在暂存和生产存储库中运行以下命令:

git fetch --prune remote +refs/tags/*:refs/tags/*

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

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