https://jingyan.baidu.com/article/f3e34a12a25bc8f5ea65354a.html

出现错误的主要原因是github中的README.md文件不在本地代码目录中

可以通过如下命令进行代码合并【注:pull=fetch+merge]

git pull --rebase origin master

执行上面代码后可以看到本地代码库中多了README.md文件

此时再执行语句 git push -u origin master即可完成代码上传到github

failed to push some refs to 'git@github.com:*/learngit.git'的更多相关文章

  1. git 报错:error: failed to push some refs to 'https://github.com/Anderson-An/******.git'(已解决)

    提交push 报错: $ git push origin masterTo https://github.com/Anderson-An/******.git ! [rejected] master ...

  2. git 解决 error: failed to push some refs to 'https://github.com/xxxx.git'

    在github远程创建仓库后, 利用gitbash进行提交本地文件的时候出现如下错误 [root@foundation38 demo]# git push -u origin master Usern ...

  3. error: failed to push some refs to 'https://github.com/username/python.git'

    解决error: failed to push some refs to 'https://github.com/bluepen/python.git' 当我们在使用git工具上传我们自己的代码时,可 ...

  4. 错误:error: failed to push some refs to 'https://github.com/pzq7025/KG.git'的解决办法

    一.问题在进行[git push orgin master]的时候出现如下错误 ! [rejected] master -> master (non-fast-forward) error: f ...

  5. git push ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/Operater9/guest' hint: Updates were rejected because the tip of your current bra

    推送本地代码到github报错 git push报错 ! [rejected] master -> master (non-fast-forward) error: failed to push ...

  6. 【错误】上传新的项目出错 error: failed to push some refs to 'https://github.com/...

    问题描述:在git bash中键入 $ git push origin master 进行提交的时候出现 如下错误: error: failed to push some refs to 'https ...

  7. git push报错! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://gitee.com/XXX.git

    git pull origin master --allow-unrelated-histories  //把远程仓库和本地同步,消除差异 git add . git commit -m"X ...

  8. error: failed to push some refs to 'https://github.com/github账号/learn_git.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caus

    在使用git 对源代码进行push到gitHub时可能会出错,信息如下   此时很多人会尝试下面的命令把当前分支代码上传到master分支上. $ git push -u origin master ...

  9. git上传文件夹报错: ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/taminachen/rjxm.git' hint: Updates were rejected because the remote contains work

    使用git上传本地文件夹到远程仓库,使用如下命令:git push -u origin master时报错 原因是在GitHub创建仓库时创建了readme文件,但是本地没有这个文件,造成本地目录与远 ...

随机推荐

  1. csdn能不靠点谱啊

    以前的时候在csdn上有一个博客,那时经常出错,所以就不用了,后来在百度上开了个博客,后以空间升级了,升级之后,那叫一个垃圾,不用了,现在返回头来再用csdn,刚开始两天还好,没用两天又不行了,想在上 ...

  2. 新手福利:Apache Spark入门攻略

    [编者按]时至今日,Spark已成为大数据领域最火的一个开源项目,具备高性能.易于使用等特性.然而作为一个年轻的开源项目,其使用上存在的挑战亦不可为不大,这里为大家分享SciSpike软件架构师Ash ...

  3. sass的学习笔记

    sass初学入门笔记(一) 我本身是个新手,一边学sass一边记下的笔记,可能有点罗嗦,但是复习起来的话还是比较全面直观的.当然,最重要的还是去实践,实践得真理 其它 CSS 预处理器语言: CSS ...

  4. jQuery-File-Upload文件上传

    http://blueimp.github.io/jQuery-File-Upload/index.html

  5. 拷贝内容到eclipse中导致JSP的auto-completion不工作

    刚才在编辑JSP文件,有一些东西我懒得敲了,就把一些代码里面拷贝到eclipse的editor中,结果你猜怎么,拷贝进去以后,jsp的auto-completion居然不工作了!(即<%%> ...

  6. 纯css3实现的3D按钮

    前面已经为大家介绍了好多纯css3实现的按钮.今天要再给大家带来一款纯css3实现的3D按钮.在实例中给出了五种颜色的3D按钮.效果图如下: 在线预览   源码下载 实现的代码. html代码: &l ...

  7. valgrind: failed to start tool 'memcheck' for platform 'amd64-linux

    valgrind运行错误 问题描述 valgrind运行时,无法找到相关工具文件,具体报错如下 valgrind: failed to start tool 'memcheck' for platfo ...

  8. 枚举类转成json

    import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; /** * portlet类别枚举类 */ ...

  9. Andriod——数据存储 SharedPrefrences

    xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= ...

  10. Android——RadioGroup和CheckBox

    xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android= ...