You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Source Tree offers an option to move a tag if I try to tag current commit using existing tag. I did that locally, but now when I try to push to bitbucket, I get the error that tag already exists.
hint: Updates were rejected because the tag already exists in the remote.
Here's the complete log of the push attempt
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags origin master:master Pushing to email@example.com:***** To firstname.lastname@example.org:**** = [up to date] master -> master = [up to date] v4.0 -> v4.0 ! [rejected] 4.0.1 -> 4.0.1 (already exists) updating local tracking ref 'refs/remotes/origin/master' error: failed to push some refs to 'email@example.com:****' hint: Updates were rejected because the tag already exists in the remote. Completed with errors, see above
How to reconcile this problem?
As mentioned in another forum (https://jira.atlassian.com/browse/SRCTREE-3018), there is another workaround using the git command line to force push the tags:
git push origin --tags -f
If you're often moving tags around, I suggest creating a custom action for this:
Script to run: git
Parameters: push origin --tags -f
Since this only affects tags, there is not as much danger involved as in other forced commands.
The only way I've found to move a remote tag is to delete it (from all remotes) and then recreate it again. SourceTree (as of 18.104.22.168509) on Windows is not capable of doing it. This documentation is incomplete, which simply covers a local case where it does work, but does not work for the remote updates with "Tag already exists".