Creating a tag whose name is taken
CommonA release script runs twice, or tags a version that was already tagged.
Confirm
git rev-parse --short TAG^{commit}
git log --oneline -1Whether the existing tag already points at the commit you meant
Fix
- If it already points at the right commit, nothing to do; make the script skip existing tags.
- If it has not been pushed and points at the wrong commit, git tag -f TAG moves it.
- If it has been pushed, use a new name such as v1.0.1, as the git-tag documentation advises.