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. 改变mysql数据库用户的权限

    mysql> grant all on *.* to test@'%';Query OK, 0 rows affected (0.00 sec) mysql> flush privileg ...

  2. C#compiler

    http://www.cnblogs.com/Ninputer/archive/2011/06/12/2078671.html Compilers - Managed Profile-Guided O ...

  3. hdoj1241 Oil Deposits

    Oil Deposits Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Tota ...

  4. 【查询优化】怎样用SQL语句查看查询的性能指标

    一.SET STATISTICS IO  (有关TSQL语句查询所产生的磁盘活动量) --显示有关由Transact-SQL 语句生成的磁盘活动量的信息 SET STATISTICS IO ON -- ...

  5. 在jsp里面不要瞎用<!-- -->注释

    如图: SEVERE: Servlet.service() for servlet jsp threw exceptionorg.apache.jasper.JasperException: /ch1 ...

  6. plsql 只能识别32位的oracle解决办法

    http://www.cnblogs.com/ymj126/p/3712727.html#undefined

  7. hive 进阶笔记

    -- mysql方式 create table account_channel(account_ String,channel_ String) as select a.account,b.chann ...

  8. 【WPF】Button按钮添加背景图片

    只是想做一个很简单的图片按钮而已,不需要那么复杂. <Button x:Name="btn" Width="145" Height="30&qu ...

  9. 你用过Spring中哪些功能?

    核心容器: IOC:依赖注入 AOP:日志记录,性能统计,安全控制,事务处理,异常处理 Spring MVC: Spring profile:生产和日常配置的切换 Spring事件触发功能:比较简单, ...

  10. kubernetes namespace

    namespace 通常用来划分项目 默认kubectl命令 操作的namespace是default kube-system是k8s的系统组件namespaces 切换namespaces: 查看配 ...