Mayec
Mayec

Reputation: 413

How can I solve this 'git pull' error due to new/changed tags?

I am trying to pull from a git repository, but it errors, not sure why. Seems it's something to do with changed or new tags:

error: 'refs/tags/v3' exists; cannot create 'refs/tags/v3/0.1' From https://bitbucket.org/*/* ! [new tag] v3/0.1
-> v3/0.1 (unable to update local ref) error: some local refs could not be updated; try running 'git remote prune origin' to remove any old, conflicting branches

I have tried 'git remote prune origin', but it doesn't seem to fix anything.

I have no tag "v3/0.1" in my local repository. I have a tag for a commit which is "v3_2", and the remote repo has two tags on that commit "v3_2" and "v3/0.1". So I suspect that either my local git doesn't accept two tags, which would be strange, or the "/" is causing the problems.

Any ideas about how to solve this, or how to find out more about what's causing the error?

Upvotes: 2

Views: 6193

Answers (2)

forvaidya
forvaidya

Reputation: 3315

you can have tags something/ABC, something/DEF

but you can't have tag by name something. Reason in this case "something" can't be file and folder at the same time.

Upvotes: 1

such
such

Reputation: 603

git remote prune removes branches but here you've got a conflicting tag.

Create a backup and remove your local tag that is conflicting.

git tag v3/0.1b v3/0.1
git tag -d v3/0.1

Then pull again. Check that it did want you wanted and remove your backup tag:

git -d v3/0.1b

Upvotes: 2

Related Questions