2

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? if yes than how?

  • 1
    May I ask why you have three separate repositories? AFAIK each repo is completely independent of any other repos (which is probably one reason why you have this setup in the first place), but you could certainly write a batch script to do this. – Tim Biegeleisen May 11 '18 at 06:13
  • 1
    We are having product life cycle and various stage of approval and for disaster recovery. Also this repos are belongs to different web application for QA's and UAT's – Darpan Chhatravala May 11 '18 at 06:17

1 Answers1

5

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:

git tag -d tag-name

Step 2: push to Development origin :

git push origin :refs/tags/tag-name

Step 3: Now run following commands in Staging and Production repository :

git fetch --prune remote +refs/tags/*:refs/tags/*
dr. strange
  • 665
  • 7
  • 22