解决——》Git push error:src refspec XXX matches more than one

刺骨的言语ヽ痛彻心扉 2023-10-23 06:13 156阅读 0赞

推荐链接:
总结——》【Java】
总结——》【Mysql】
总结——》【Redis】
总结——》【Kafka】
总结——》【Spring】
总结——》【SpringBoot】
总结——》【MyBatis、MyBatis-Plus】

解决——》Git push error:src refspec XXX matches more than one

  • 1、操作
  • 2、现象(错误信息)
  • 3、原因
  • 4、解决
    • 方案1:重新命名tag名称
    • 方案2:删除指定tag(确定标签无用时)
      • 1) 查看tag列表
      • 2)删除指定tag
      • 3)再次push

1、操作

git push

2、现象(错误信息)

  1. error: src refspec master matches more than one.
  2. error: failed to push some refs to 'xxx.git'

3、原因

git里有一个tag(标签)和当前提交分支重名了,git检测到多个重复名称,因而报错提示

4、解决

方案1:重新命名tag名称

方案2:删除指定tag(确定标签无用时)

1) 查看tag列表

git tag

2)删除指定tag

git tag -d v1.2

3)再次push

git push

发表评论

表情:
评论列表 (有 0 条评论,156人围观)

还没有评论,来说两句吧...

相关阅读