Git提交代码push时,报错这个

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

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

解决办法:

1、云端重新命名tag,弄好后重新pull,再push,如果还不行,就用第二种

2、本地删除掉tag,再push就可以了

- 如果是SourceTree,直接找到tag,删掉即可,

- 如果是终端命令行执行:

不过最后记得让添加tag的人,重命名下tag。

最后总结:

打tag,记得不要和已有分支重名哦~~

-

Git提交代码报错Git push error:src refspec XXX matches more than one解决方案的更多相关文章

  1. git提交代码报错 trailing whitespace的解决方法

    1. git提交代码报错 trailing whitespace 禁止执行pre-commit脚本 进入到项目目录中 chmod a-x .git/hooks/pre-commit 2.git提交代码 ...

  2. error: src refspec XXX matches more than one

    error: dst refspec v1. matches more than one. error: failed to push some refs to '' 错误原因是 branch名和ta ...

  3. git 提交代码报错failed to push some refs to 解决笔记

    Administrator@SC- MINGW64 /e/gitrepository (master) $ git push django master To github.com:zgc137/dj ...

  4. git提交代码报:fatal: Unable to create 'E:/testGit/test/.git/index.lock': File exists.

    git提交代码报错,提示:fatal: Unable to create 'E:/testGit/test/.git/index.lock': File exists. 具体截图如下: 在.git目录 ...

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

    今天在使用 Git push 代码时遇到一个报错: error: src refspec master matches more than one. error: failed to push som ...

  6. git push 失败出现error: src refspec master does not match any.解决方案

    今天写好一个demo往GitHub上传时报错 错误提示: error: src refspec master does not match any. error: failed to push som ...

  7. svn 提交代码报错

    svn 提交代码报错 最近新安装了TortoiseSvn 1.92,在上传代码,其中有新增加的文件,出现如下错误: 解决方法: 1.用vs生成patch文件 2.生成的patch文件中讲nonexis ...

  8. 提交代码报错 error: failed to push some refs to

    在本人想把本地的分支推送到远程仓库时,突然出现了错误提醒error: failed to push some refs to....心里一咯噔,推不上去这还得了,手比脑快地就去google了一下. 然 ...

  9. 码云 VS首次提交代码报错:failed to push some refs to 'https://gitee.com/Liu_Cabbage/ASP.NET-MVC-QQ-Connect.git'

    打开命令提示符: 执行合并命令: git pull --rebase origin master 最后总结: 1.多为第一次提交代码,本地和码云仓库不一致,README.md文件不在本地代码目录中 2 ...

随机推荐

  1. QMUI UI库 控件 弹窗 列表 工具类 MD

    Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...

  2. Fixing the JavaScript typeof operator

    https://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/javascript 类 ...

  3. vim高级用法

    http://vim.wikia.com/wiki/Using_command-line_history ----------------------------------------------- ...

  4. Mongo如何在多个字段中查询某个关键字?

    If a text index has multiple fields in Mongo, how can I do a search in only one field since the weig ...

  5. 在java中像js那样处理json数据

    工作中经常需要通过ajax向前台返回json数据,都是通过拼字符串拼出来的,很发麻烦不说,还容易出错. 于是想,能不能像js那样操作json呢?或者说更方便的操作呢? Google的gson就是这样的 ...

  6. Android Studio:xxx is not an enclosing class 错误的解决方法

    Android Studio:xxx is not an enclosing class 错误的解决方法 这个问题一般出现在内部类中,若要创建内部类的实例,需要有外部类的实例才行,或者是将内部类设置为 ...

  7. Office办公 WPS如何设置页边距

    打开页眉页脚,在选项里面可以设置顶部的一行文字距离边界的距离   此外在页面布局,页边距也可以查看和修改                        

  8. C#.NET常见问题(FAQ)-如何修改Form不能修改窗体大小

    把FormBorderSytle改一下就可以了,改成FixedSingle或者Fixed3D都可以   更多教学视频和资料下载,欢迎关注以下信息: 我的优酷空间: http://i.youku.com ...

  9. Unity3D 导入Xcode 工程后。编译很慢

    Unity3D 导入Xcode 工程后.编译很慢 选择Targets-->Build options -->debug information format  然后选择DWARF 这样再次 ...

  10. CheeseZH: Stanford University: Machine Learning Ex5:Regularized Linear Regression and Bias v.s. Variance

    源码:https://github.com/cheesezhe/Coursera-Machine-Learning-Exercise/tree/master/ex5 Introduction: In ...