From https://git-scm.com/docs/git-pull/2.34.0:
-p--pruneBefore fetching, remove any remote-tracking references that no longer exist on the remote. Tags are not subject to pruning if they are fetched only because of the default tag auto-following or due to a--tagsoption. However, if tags are fetched due to an explicit refspec (either on the command line or in the remote configuration, for example if the remote was cloned with the--mirroroption), then they are also subject to pruning. Supplying--prune-tagsis a shorthand for providing the tag refspec.
However, my git pull gives me an error:
$ git --version
git version 2.34.1.windows.1
$ git pull --prune-tags
error: unknown option `prune-tags'
$ git pull --prune --prune-tags
error: unknown option `prune-tags'
$ git pull --prune --tags --prune-tags
error: unknown option `prune-tags'
Even:
$ git pull --prune --tags origin --prune-tags
error: unknown option `prune-tags'
However, this works, assuming t1 is a name of the tag:
$ git pull --prune --tags origin t1
From ssh://[stripped]
* tag t1 -> FETCH_HEAD
Already up to date.