添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
腼腆的墨镜  ·  Bitbucket Data Center ...·  3 天前    · 
踢足球的奔马  ·  Pushing a branch to ...·  2 周前    · 
帅呆的马克杯  ·  Bitbucket pipeline ...·  2 月前    · 
不羁的胡萝卜  ·  腾讯微视·  2 月前    · 
宽容的企鹅  ·  马斯克开源 ...·  5 月前    · 
豪气的创口贴  ·  having bad problem ...·  1 年前    · 

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms .

Support for Server* products ended on February 15th 2024 . If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

The error "refspec matches more than one" is shown while pushing a branch to Bitbucket.

This occurs because there is more than one Git ref that matches the ref name specified in the push command.

Example

Suppose a repo has a branch and a tag with the same name, " dev ".

When an attempt is made to push the "dev" branch to the remote, the error " refspec matches more than one " will be shown and the push fails.

Case 1: Local refs

If the branch and the tag are on the local copy of the repo, the push will show the error:

error: src refspec dev matches more than one error: failed to push some refs to 'ssh://bitbucket.myhost.com:7999/proj1/repo-test.git'
  • "src" indicates that the ref name " dev " matches more than one ref in the local copy (source)

Case 2: Remote refs

If the branch and the tag are on the remote, the push will show the following error:

error: dst refspec dev matches more than one error: failed to push some refs to 'ssh://bitbucket.myhost.com:7999/proj1/repo-test.git'
  • "dst" indicates that the ref specification " dev " matches more than one ref in the remote (destination)

Solution

Case 1: Local refs

First, check for branches and tags that have the same ref name on the local copy of the repo.

For example, to check for a branch with the name "dev":