git tags ai_generated true

fatal: tag 'v1.0.0' already exists

ID: git/would-clobber-existing-tag

Also available as: JSON · Markdown
97%Fix Rate
98%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
2 active

Root Cause

Attempting to create a tag that already exists.

generic

Workarounds

  1. 93% success Use a different tag name: v1.0.1 or v1.0.0-rc2
    Semantic versioning should increment, not reuse tags
  2. 88% success If you need to move the tag: git tag -d <tag> && git push origin :refs/tags/<tag> && git tag <tag> && git push origin <tag>
    Deletes locally and remotely, then recreates — communicate to team

    Sources: https://git-scm.com/docs/git-tag

Dead Ends

Common approaches that don't work:

  1. Deleting the tag and recreating 55% fail

    If already pushed, other clones still have the old tag pointing to the old commit

  2. Using git tag -f to force-update 50% fail

    Changes tag for you locally but remote and others still have the old one

Error Chain

Frequently confused with: