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. Palindrome Partitioning leetcode java

    题目: Given a string s, partition s such that every substring of the partition is a palindrome. Return ...

  2. Jsonp 关键字详解及json和jsonp的区别,ajax和jsonp的区别

    为什么要用jsonp? 相信大家对跨域一定不陌生,对同源策略也同样熟悉.什么,你没听过?没关系,既然是深入浅出,那就从头说起. 假如我写了个index页面,页面里有个请求,请求的是一个json数据(不 ...

  3. 强化Linux安全的10个技能

    1.找出不必要的服务 很明显,服务器上跑的服务,并不是每个都有用的.强烈建议检查并关掉不需要的服务,从而减少风险(多跑一个服务,就可能多几个漏洞). 查询运行在runlevel 3的服务列表: [af ...

  4. mysql游标的使用 No data - zero rows fetched, selected

    转自:http://blog.sina.com.cn/s/blog_544c72960101bvl3.html 这是一个游标的使用例子. 但是其中有几点需要注意,就是为什么要加入 declare CO ...

  5. Virtualbox安装Ubuntu

    每次安装虚拟机都是总要折腾一下,毕竟不是特别熟悉,几个小细节总要google半天,为了以后能愉快的玩耍.把这些问题都记录下来,免得再折腾. 此文档都来自其他人的文章,我保存在Evernote整理. 网 ...

  6. LeetCode Anagrams My solution

    Anagrams Given an array of strings, return all groups of strings that are anagrams. Note: All inputs ...

  7. PHP Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity,

    $html = file_get_contents("http://www.somesite.com/"); $dom = new DOMDocument(); $dom-> ...

  8. Zabbix-Agent在主动模式启动服务后,提示no active checks on server [139.219.xx.xx:10051]: host [139.219.xx.xx] not found

    一.解决方法

  9. python object对象

    动态语言的对象属性 既然都是动态语言,自然python和熟知的JavaScript很像,建一个空对象用来存放所有的数据,看看js: var data = {}; data.name = 'CooMar ...

  10. Android sdk content loader 0%

    打开Eclipse以后,一直在Android sdk content loader 0%,等了很长时间都没有变,解决的方法是Project->Clean->Clean all projec ...