We use tags in git as part of our deployment process. From time to time, we want to clean up these tags by removing them from our remote repository.
This is pretty straightforward. One user deletes the local tag and the remote tag in one set of commands. We have a little shell script that combines both steps.
The 2nd (3rd, 4th,...) user now has local tags that are no longer reflected on the remote.
I am looking for a command similar to git remote prune origin
which cleans up locally tracking branches for which the remote branch has been deleted.
Alternatively, a simple command to list remote tags could be used to compare to the local tags returned via git tag -l
.
git config fetch.pruneTags true
will make yourgit fetch
do what you want! See my answer to this other question. – VonC