2

I'm using a repository which has some tags moving around (bad idea, but let's assume this can't be changed). Specifically each tested deployment moves tag called green.

This causes issues with git 2.21.0, where each pull does the fetch step successfully, but doesn't actually change the checked out state, because:

 ! [rejected]                green -> green  (would clobber existing tag)

If I remove the tag manually, the pull works, but after a few hours, I'm left with a rejected tag again.

Can I configure git to accept tag clobbering by default? Or filter this specific tag somehow. (I don't care if it's not available locally)

0

Can I configure git to accept tag clobbering by default?

Yes. Using git fetch --tags might do it, in which case configuring tagOpt will work. If that fails, an explicit +refs/tags/*:refs/tags/* refspec, either on the command line or in the fetch = setting for the given remote, will definitely do the job.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.