Git遇到的一点错误
【背景】
折腾:
【记录】将googlecode上面的crifanLib迁移到Github上
期间出错:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
出错了。
很明显是:
本地没有update到最新版本的项目(git上有README.md文件没下载下来)
本地直接push所以会出错。
【解决过程】
1.看到提示里面,感觉是本地的代码不是最新的。
所以觉得应该是类似于svn中的,先update一下,再去commit,估计就可以了。
所以先去pull试试:
结果直接pull好像是不对的:
![]()
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
看来需要先搞懂pull的用法。
2.估计是指定对应的要pull的目标即可。
所以再去试试pull origin:
![]()
|
1 2 3 4 5 |
|
也还是不对。
有空再继续搞懂原理后再弄。。
3.搜:
error: failed to push some refs to
参考:
github – git error: failed to push some refs to – Stack Overflow
去试试:
![]()
|
1 2 3 4 5 6 |
|
可以看到,此时已经把github上最新的文件下载下来了:
![]()
即,那个README.md文件。
4.接着再去:
git push origin master
![]()
|
1 2 3 4 5 6 7 8 9 10 11 |
|
即可成功把本地的文件都上传到github上面去了。
5.此时再去github网站上也就可以看到对应文件了:
![]()
【注意】
此处注意到,此时所用的用户,是那个当前电脑的名词,很长的那个,而不是crifan:
![]()
那是因为之前那个:
【已解决】cygwin中用git去config配置用户名和邮箱出错:error: cannot run vi: No such file or directory
时,当时没有解决掉用户名的问题就去commit了。
所以用户名是当时的,当前电脑的用户名。而不是我自己的crifan。
而此时已经解决了修改用户名的问题。
等下次再去上传,或许可以把用户名变过来了。
Git遇到的一点错误的更多相关文章
- git push origin master、git pull出现如下错误
git push origin master出现如下错误: Counting objects: , done. Writing objects: % (/), bytes, done. Total ( ...
- Git版本控制:Git冲突解决 相关错误总结
http://blog.csdn.net/pipisorry/article/details/46958699 冲突处理 git push冲突处理 git push时出现冲突:! [rejected] ...
- 关于git上的一些错误信息
如果输入$ Git remote add origin git@github.com:djqiang(github帐号名)/gitdemo(项目名).git 提示出错信息:fatal: remote ...
- git remote add origin错误
如果输入$ Git remote add origin git@github.com:djqiang(github帐号名)/gitdemo(项目名).git 提示出错信息:fatal: remote ...
- git提交代码出现错误fatal: Unable to create '项目路径/.git/index.lock': File exists.
git提交代码出现错误fatal: Unable to create '项目路径/.git/index.lock': File exists. 具体出错代码如下: 具体原因不详,在stackoverf ...
- [git 学习篇] git remote add origin错误
http://blog.csdn.net/dengjianqiang2011/article/details/9260435 如果输入$ Git remote add origin git@githu ...
- Git学习之常见错误 git push 失败
Git学习之常见错误 git push 失败 问题描述: git push Counting objects: , done. Delta compression using up to thread ...
- Git学习之常见错误 clone被拒绝
Git学习之常见错误 问题: git clone 时 报错 Permission Denied (权限被拒绝). 解决方法: 需要把本地的公钥上传到服务器. 解决步骤: ①第一步,设置本地的git的用 ...
- git ,报403错误,完美解决方案
首先命令行操作结果如下: root@zhiren-PowerEdge-T110-II:/zrun# git clone https://git.coding.net/xxxxxxxx/xxxx.git ...
随机推荐
- springmvc使用@ResponseBody返回json乱码解决方法
1.springmvc 3.2以上的版本解决乱码的方法: 第一步:在配置中加入: <mvc:annotation-driven> <mvc:message-converters re ...
- Linux中Curl命令couldn't connect to host解决方案 php操作Curl(http,https)无法获取远程数据解决方案
本人在做百度账户第三方登录接口,获取百度token,利用php操作curl post方式发送请求token,出现couldn't connect to host错误.经过调试测试,最后终于成功.回头写 ...
- 在eclipse中部署发布web项目 和 更改eclipseweb项目发布的路径
我的工作空间:d:workspaceweb项目名称:xxx在eclipse配置完tomcat后,发布到的路径是 d:\workspace\.metadata\.plugins\org.eclipse. ...
- PS软件之,快速的修改图片你的尺寸
进入 -- 图像 --- 图像尺寸 -- (前面两个去掉后,只剩下最后一个选项的时候就能够任意的修改图像的尺寸)
- [页面辅助] 最新的 PageValidate 类 (转载)
代码 using System; using System.Data; using System.Configuration; using System.Web; using System.Text. ...
- C#中Hashtable、Dictionary详解以及写入和读取对比
转载:http://www.cnblogs.com/chengxingliang/archive/2013/04/15/3020428.html 在本文中将从基础角度讲解HashTable.Dicti ...
- WinEdt打开UTF-8文件乱码问题——ctex[转]
原来这么简单,mark一下! [转自:http://fstang.diandian.com/post/2012-04-17/40030401020] 其实这个问题网上文章已经有一大堆了...我只是记录 ...
- Excel数据导入到oracle
打开pl/sql,如图所示界面,点击菜单栏中的T00LS ODBC Imtorper,打开ODBC Importer选项框 在Data fromODBC页中选择需要导入的文件的格式 ...
- 函数还能这样玩儿~实现类似add(1)(2)(3)的函数
人生的第一份前端工作找到了,感谢大神主子们给半路出家自学的我这么多的机会,很高兴正式踏上客观又乐趣满满的程序员之路,哇咔咔咔. 分享一个准备面试时遇到的一个有趣的问题: 要求实现类似add(1)( ...
- 100. Same Tree(C++)
100. Same Tree Given two binary trees, write a function to check if they are equal or not. Two binar ...