github上传时出现error: src refspec master does not match any解决办法
github上传时出现error: src refspec master does not match any解决办法
这个问题,我之前也遇到过,这次又遇到了只是时间间隔比较长了,为了防止以后再遇到类似问题,还是把这个方法简单记录在此。
当然,是通过搜索引擎找到的答案,开始用谷歌,我以为stackoverflow会很权威的,结果在这上面没有找到合适的。
http://stackoverflow.com/questions/21264738/error-src-refspec-master-does-not-match-any
反倒是换用百度输入,查看中文的东西才解决了这个问题。
问题产生
原因分析
引起该错误的原因是,目录中没有文件,空目录是不能提交上去的
解决方法
touch README
git add README
git commit -m 'first commit'
git push origin master
来自:http://www.open-open.com/lib/view/open1366080269265.html
实际上
git init
这一步之后创建了一个名为.git的文件夹,不过它在默认状态下是隐藏的,系统将隐藏文件夹显示出来,可以看到有这样一个文件夹。
github上传项目方法:
http://www.oschina.net/question/159132_86728
在你的电脑上装好git
大致流程是:
1、在github上创建项目
2、使用git clone https://github.com/xxxxxxx/xxxxx.git克隆到本地
3、编辑项目
4、git add . (将改动添加到暂存区)
5、git commit -m "提交说明"
6、git push origin master 将本地更改推送到远程master分支。
这样你就完成了向远程仓库的推送。
如果在github的remote上已经有了文件,会出现错误。此时应当先pull一下,即:
git pull origin master
然后再进行:
git push origin master
github上传时出现error: src refspec master does not match any解决办法的更多相关文章
- github上传时出现error: src refspec master does not match any解决办法22
1 error:src refspec master does not match any这个问题,我之前也遇到过,这次又遇到了只是时间间隔比较长了,为了防止以后再遇到类似问题,还是把这个方法简单记录 ...
- 解决:github上传时出现error: src refspec master does not match any
原因分析 引起该错误的原因是,目录中没有文件,空目录是不能提交上去的 解决方法 touch README git add README git commit -m 'first commit' git ...
- 【github问题】error: src refspec master does not match any解决方法|please tell me who you are
http://www.open-open.com/lib/view/open1366080269265.html这个先记录一下省得以后再找 我这里要解决的问题根本是:please tell me wh ...
- git push 时发生错误 error: src refspec master does not match any. error: failed to push some refs to
很多相关解决办法都是最后要 push 到远端的 master 上,但很多其实要求不能把个人的修改内容直接 push 到 master 主分支. 因此,当我想将本地 feature/work1 分支的修 ...
- 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 ...
- GIT问题,error:src refspec master does not match any
将本地GIT版本库PUSH到一个GITHUB上一个空的版本库时可能会出现如下错误error:src refspec master does not match any原因: 本地版本库为空, 空目录不 ...
- Git提交出现error: src refspec master does not match any的问题
在本地与远程分别新建了一个仓库并且关联后,想要把本地的文件提交到github上面, 输入下方命令后没有成功,而是出现了报错:error: src refspec master does not mat ...
- error: src refspec master does not match any. 错误处理办法
自从上次学了git之后,很少用.今天在使用 本地仓库使用如下命令初始化: $ git init 之后使用如下命令添加远程库: $ git remote add origin git@github.co ...
- Git:错误:error:src refspec master does not match any
新建立了一个远程仓库,想着把项目放上去.于是在项目目录上: git init 然后就添加远程库 git remote add origin xxxx.git 然后就想push: git push -u ...
随机推荐
- jsp学习笔记之:4种基本语法
一. jsp注释:<%-- js注释 --%> 二. jsp声明: <%! public int count; public String test(){return "j ...
- Python基础_文件的的处理及异常处理
今天主要讲讲文件读写及异常处理. 一.文件操作 1.1 文件的创建及读 打开文件 open 函数 open(file,[option]) file 是要打开的文件 option是可选择的参数文件的打 ...
- C#多线程编程(1)--线程,线程池和Task
新开了一个多线程编程系列,该系列主要讲解C#中的多线程编程. 利用多线程的目的有2个: 一是防止UI线程被耗时的程序占用,导致界面卡顿:二是能够利用多核CPU的资源,提高运行效率. 我没有进行很 ...
- 安裝pycharm
一路按照這個教程走下來的.大體無誤. http://www.jianshu.com/p/042324342bf4 除了激活碼那裏,已經被cancel了,查找了很多辦法,最後發現衹要換成三個選項之一的 ...
- Spark ML源码分析之一 设计框架解读
本博客为作者原创,如需转载请注明参考 在深入理解Spark ML中的各类算法之前,先理一下整个库的设计框架,是非常有必要的,优秀的框架是对复杂问题的抽象和解剖,对这种抽象的学习本身 ...
- handsontable 属性汇总
常规属性: 1.固定行列位置 fixedRowsTop:行数 //固定顶部多少行不能垂直滚动 fixedColumnsLeft:列数 //固定左侧多少列不能水平滚动 2.拖拽行头或列头改变行或列的大小 ...
- Redis 基础(一)
Remote Dictionary Server(Redis)是一个由Salvatore Sanfilippo写的key-value存储系统.Redis是一个开源的使用ANSI C语言编写.遵守BSD ...
- 简述TCP的三次握手过程
一.TCP报文格式 TCP/IP协议的详细信息参看<TCP/IP协议详解>三卷本.下面是TCP报文格式图: 图1 TCP报文格式 上图中有几个字段需要重点介绍下: ...
- Geth 控制台使用及 Web3.js 使用实战
在开发以太坊去中心化应用,免不了和以太坊进行交互,那就离不开Web3.Geth 控制台(REPL)实现了所有的web3 API及Admin API,使用好 Geth 就是必修课.结合Geth命令用法阅 ...
- 需求分析---NABCD
N(Need,需求) 我们的产品未来天气,是为了解决不爱看天气预报的群众开发一款类似备忘录式的天气预报软件.很多人认为今天天气很好,明天肯定不会差,但是风云忽变,可能明天就降大雨,所以就忽略了带伞, ...