checkout icon indicating copy to clipboard operation
checkout copied to clipboard

Option to prune tags on fetch

Open CDTR-MattConroy opened this issue 5 months ago • 1 comments

Occasionally (but rarely) tags are pushed that are then deleted. I use Git tags for my versioning, meaning if I ever re-tag the same commit again to trigger a workflow, persistent build agents will still be aware of the old tags on that commit that only exist locally. Could there an option (perhaps, I would argue, by default) to git fetch --prune --prune-tags on checkout to ensure tags that no longer exist in the remote exist locally?

CDTR-MattConroy avatar Jul 24 '25 15:07 CDTR-MattConroy

Seems like a good idea to me.

Pros:

  • removing old tags makes things a bit cleaner, and can be sure your workflow is verifying the correct thing

Cons:

  • might take a bit longer.

diroussel avatar Sep 19 '25 15:09 diroussel