使用 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 了

posted @ 2017-01-04 18:22  宁采桃花不采臣  阅读(6363)  评论(2编辑  收藏  举报