tag already exists in the remote error when pushing commits
Posted on April 6, 2015
When a tag is created, removed and recreated with the same name, it can lead to errors by other git clients. mainly the error “tag already exists in the remote”
Sync tags based on hash instead of name
To fix this error on the client site, the local repo must be synced with the remote. The next command will sync the tags based on hash instead of the name.
git fetch --prune origin +refs/tags/*:refs/tags/*