使用 Git 报错 error: src refspec master matches more than one.


今天在使用 Git push 代码时遇到一个报错:

error: src refspec master matches more than one.
error: failed to push some refs to 'git@127.0.0.1:yn/enh.git'

 

出现这个错误是因为有一个与当前提交分支同名的标签

 

查看标签列表:

git tag

 

删除这个标签(确定标签无用时):

git tag -d <tag-name>

 

 

再次 push 就 ok 了


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM