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 ...
随机推荐
- Linux之shell典型应用之脚本实现
一. 提取Linux操作系统信息 二. 获取操作系统运行状态 三. 分析应用状态 四. 应用日志分析 第一章:VIM编辑器设置 一.语法高亮 syntax on/off 二.显示行号 set ...
- JS实现回到Top(顶部)--JavaScript
当我们浏览一段很长的网页时,已经看到底部了,想回到顶部看前面的内容,可是需要滚动好几转鼠标滑轮或者拉动滚动条走好长“一段路”.这对于用户来说,体验效果是不够好的.如果我们借助简单的一个按钮,点击一下就 ...
- [POJ2774]Long Long Message
vjudge 一句话题意 给两个串,求最长公共子串. sol 把两个串接在一起求后缀数组.其实中间最好用一个没有出现过的字符连接起来. 判断如果\(SA[i]\)和\(SA[i-1]\)不属于同一个串 ...
- ajax 上传文件
最近做公司官网,需要用到上传文件功能,由于是用JQ写的,用到了input标签 的type=file 属性,然后利用表单提交方式上传,代码如下: $('#upload_video').change(fu ...
- Zabbix 微信报警Python版(带监控项波动图片)
#!/usr/bin/python # -*- coding: UTF- -*- #Function: 微信报警python版(带波动图) #Environment: python import ur ...
- redux (一)
redux 是一个状态管理的库. redux认为页面所有的变化,都是基于状态的改变触发的,所以我们维护一个应用的时候,都是在维护这些状态.而 redux 就是为了维护状态而生的. API create ...
- python模板:自动化执行测试函数
#!/bin/python #example 1.1 #applay def function(a,b): print(a,b) def example1(): apply(function, (&q ...
- Numpy库的下载及安装(吐血总结)
Python很火,我也下了个来耍耍一阵子.可是渐渐地,我已经不满足于它的基本库了,我把目光转到了Numpy~~~~~ 然而想法总是比现实容易,因为我之前下的是Python3.3.x,所有没有自带pip ...
- Cannot resolve taglib with uri http://java.sun.com/jsp/jstl/core
问题 <Spring 实战>第5章,在 IDEA 中 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" pre ...
- 可能是最好的SQL入门教程
个人博客:这可能是最好的SQL入门教程