git报错error: src refspec refs/heads/master does not match any.
$ git push
error: src refspec refs/heads/master does not match any.
error: failed to push some refs
出错解决方案:

首先先试试注释

1.本地git仓库目录下为空
2.本地仓库add后未commit
3.git init错误
解决:
1.控制面板打开文件夹选项 打开隐藏文件和文件夹显示
2.到本地仓库目录下查看是否有.git文件夹——无 则git init
3.看.git文件夹下是否有之前提交的文件——若无 则重新 git commit (如果之前git add过的话 没有就要重新 add commit)
有问题请留言,感谢大家
git报错error: src refspec refs/heads/master does not match any.的更多相关文章
- 使用 Git 报错 error: src refspec master matches more than one.
今天在使用 Git push 代码时遇到一个报错: error: src refspec master matches more than one. error: failed to push som ...
- git报错:src refspec master does not match any
问题出现:git推送本地内容到远程仓库时,报错src refspec master does not match any. 1.我的流程: mkdir project_k命令,新建本地仓库. cd p ...
- Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).
Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). Git fet ...
- 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).
Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 2017年02 ...
- git:Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).
Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 解决办法一:保 ...
- Git提交出现error: src refspec master does not match any的问题
在本地与远程分别新建了一个仓库并且关联后,想要把本地的文件提交到github上面, 输入下方命令后没有成功,而是出现了报错:error: src refspec master does not mat ...
- Git:错误:error:src refspec master does not match any
新建立了一个远程仓库,想着把项目放上去.于是在项目目录上: git init 然后就添加远程库 git remote add origin xxxx.git 然后就想push: git push -u ...
- [转]解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).
Git fetch和git pull的区别: 都可以从远程获取最新版本到本地 1.Git fetch:只是从远程获取最新版本到本地,不会merge(合并) $:git fetch origin mas ...
- git 报错 error: failed to push some refs to .....
git push 代码的时候报错,报错如下: 这种报错是因为远程仓库的代码和本地仓库的代码不同步,对本地的代码进行一次拉取,再 git push 就可以解决了 通过如下命令进行代码合并 git pul ...
随机推荐
- (转)python strip()函数 去空格\n\r\t函数的用法
原文:http://www.cnblogs.com/zdz8207/p/python_learn_note_20.html python3.4学习笔记(二十) python strip()函数 去空格 ...
- CMD 模块定义规范【转】
在 Sea.js 中,所有 JavaScript 模块都遵循 CMD(Common Module Definition) 模块定义规范.该规范明确了模块的基本书写格式和基本交互规则. 在 CMD 规范 ...
- js中防止事件传播的方法
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- select操作大全
每一次操作select的时候,总是要出来翻一下资料,不如自己总结一下,以后就翻这里了. 比如<select class="selector"></select&g ...
- VS2008、 VS2010 、 VS2012、 VS2013 都能用的快捷键
VS2008. VS2010 . VS2012. VS2013 都能用的快捷键 Ctrl+E,D --格式化全部代码 Ctrl+K,F --格式 ...
- IMG标签与before,after伪类
在CSS中总有一些你不用不知道,用到才知道的“坑”.比如今天要谈的,把 before, after 伪类用在 <img> 标签上.嗯,实际上你用你会发现,在大多数浏览器这是无效的,dom中 ...
- C#中.Net的值传递和引用传递
/// <summary> /// 电脑类 /// </summary> public class Computer { public string Type { get; s ...
- jar命令使用介绍
http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/jar.html Skip to Content Oracle Technol ...
- SpringCloud的学习记录(8)
这一章节讲zipkin-server. 在我们生成的Demo项目上右键点击New->Module->spring Initializr, 然后next, 填写Group和Artifact等 ...
- scope 作用域(bean 的生存范围)
默认是 singleton ,单例模式,如下代码: @Test public void testAddUser() throws Exception { ApplicationContext ctx ...