“tag already exists in the remote" error after recreating the git tag

前端 未结 8 949
悲&欢浪女
悲&欢浪女 2020-12-04 06:00

I get the following error after I run the steps below:

To git@provider.com:username/repo-name.git
 ! [rejected]        dev -> dev (already exists)
error:          


        
8条回答
  •  不知归路
    2020-12-04 06:34

    It's quite simple if you're using SourceTree.

    Basically you just need to remove and re-add the conflicting tag:

    1. Go to tab Repository -> Tag -> Remove Tag
    2. Select the conflicting tag name
    3. Check Remove tag from all remotes
    4. Press Remove
    5. Create new tag with the same name to the proper commit
    6. Make sure to check Push all tags when pushing your changes to remote

提交回复
热议问题