When attempting to Push via Source Tree, I get the following error:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags origin refs/heads/master:refs/heads/master
Pushing to https://user@github.com/repo.git
To https://user@github.com/repo.git
= [up to date] master -> master
...
! [rejected] example_tag -> example_tag (already exists)
updating local tracking ref 'refs/remotes/origin/master'
error: failed to push some refs to 'https://user@github.com/repo.git'
hint: Updates were rejected because the tag already exists in the remote.
Completed with errors, see above
I didn't make any changes to this tag as far as I know. How can I fix this?
If you have not made any local changes to the tag that you want to keep, then you can remove tag that was rejected because it already exists (example_tag
in this case):
The reason this is common in SourceTree is because the Push all tags option is set to on by default. (Another way to hide this error is to uncheck that option.)