在github上修改过readme.md后,在本地执行git push origin master后会提示:

$ git push origin master
To github.com:taozhuowei/StoreMyToys.git
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'git@github.com:taozhuowei/StoreMyToys.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

解决方式:git pull --rebase origin master 将github修改的文件更新到本地

$ git pull --rebase origin master
remote: Enumerating objects: 21, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 17 (delta 4), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (17/17), 3.99 KiB | 5.00 KiB/s, done.
From github.com:taozhuowei/StoreMyToys
 * branch            master     -> FETCH_HEAD
   5afe506..b843c89  master     -> origin/master
First, rewinding head to replay your work on top of it...
Applying: commit Vue to-do

再次提交:git push origin master

$ git push origin master
Enumerating objects: 26, done.
Counting objects: 100% (26/26), done.
Delta compression using up to 8 threads
Compressing objects: 100% (22/22), done.
Writing objects: 100% (25/25), 49.42 KiB | 153.00 KiB/s, done.
Total 25 (delta 0), reused 0 (delta 0)
To github.com:taozhuowei/StoreMyToys.git
   b843c89..bc04ef1  master -> master

提交成功

Git教程:! [rejected]        master - master (fetch first)解决办法相关推荐

  1. mysql master status_show master status为空解决办法

    show master status为空解决办法 kerwin 五月 29, 2014 默认yum安装了mysql,现在想调试一下主从,结果发现执行show master status为空. Welc ...

  2. git branch -a无法显示远程分支解决办法

    阅文时长 | 0.2分钟 字数统计 | 330.4字符 主要内容 | 1.引言&背景 2.git fetch拓展 3.声明与参考资料 『git branch -a无法显示远程分支解决办法』 编 ...

  3. ubuntu amd 64bit 安装 QQ for linux教程(附 不能使用中文的解决办法)

    ubuntu amd 64bit 安装 QQ for linux教程(附 不能使用中文的解决办法) Ubuntu 64bit 安装32bit软件 64bit系统构架的先进不由多讲,只是应用程序相对少了 ...

  4. SVN仓库迁移到Git遇到的两个问题和解决办法

    SVN仓库迁移到Git遇到的两个问题和解决办法 参考文章: (1)SVN仓库迁移到Git遇到的两个问题和解决办法 (2)https://www.cnblogs.com/shawnpoo/p/SVN-c ...

  5. Html设置表格撑开,CSS教程:表格不被撑开的解决办法

    CSS教程:表格不被撑开的解决办法 2009-10-21 eNet&Ciweek 今天在做一个用户留言列表的时候,用到了表格.用户名为英文字符时,就会把固定宽度的单元格撑开.之前也有遇到过.解 ...

  6. html 单元格被撑开_CSS教程:表格不被撑开的解决办法—css教程

    今天在做一个用户留言列表的时候,用到了表格.用户名为英文字符时,就会把固定宽度的单元格撑开.之前也有遇到过.解决办法:先用noWrap令文字不换行,再用style=table-layout:fixed ...

  7. Git教程:! [rejected] master -> master (fetch first)解决办法

    在github上修改过readme.md后,在本地执行git push origin master后会提示: $ git push origin master To github.com:taozhu ...

  8. Git教程:! [rejected] master -> master (fetch first)解决办法

    git push的时候 Merge branch 'master' of github.com:Or-Coal/toutiao-m # Please enter a commit message to ...

  9. git推送报错“! [rejected] master -> master (fetch first)解决办法

    git推送报错"! [rejected] master -> master (fetch first)" 今天上传git的时候出现了 To git@git.oschina.n ...

最新文章

  1. 模型也可以上网课?!一文看懂服务型蒸馏训练方案
  2. 如何用php向wsdl服务器发请求,知道服务器端Wsdl,不写服务端代码,仅写客户端代码能调用服务端的方法吗?...
  3. Android--框架布局
  4. 【P1835】小红花
  5. 高性能平台设计—美团旅行结算平台实践
  6. Spring 阶段总结
  7. PS3中文游戏合集下载
  8. Linus ,扎克伯格,雷军等巨佬的办公桌
  9. windows下的流氓软件删得彻底点
  10. SQL join关联三个表或多个表
  11. 关于Arcgis这62个常用技巧,你造吗
  12. 通过url路径传递参数
  13. ProtoBuf - Arena
  14. 博通Broadcom SDK源码学习与开发8——内存与参数管理
  15. 吐槽一下一些垃圾网站
  16. 正确设置Windows缓存 让系统快步如飞
  17. 【数据增强】图像训练技巧
  18. 推荐系统学习笔记召回策略之基于协同过滤召回
  19. Win10配置IIS与 C#/.net项目的发布与IIS部署
  20. 吲哚菁绿-氨基|1686147-55-6|ICG-NH2,ICG-Amine|近红外荧光染料

热门文章

  1. python画图代码的输入数据可以取出来_python 导入数据及作图的实现
  2. 小恐龙跳跳跳-周雨涵小游戏 -C
  3. hight, low Temperature
  4. 蓝桥杯 算法提高 质数的后代
  5. iOS界面设计,12个优秀案例激发你的灵感
  6. 12306应该如何应对黄牛抢票 ,补充和修正
  7. Netty对象池技术Recycler解析
  8. 12月19日——培训第26天
  9. python调用pygame_python使用pygame模块实现坦克大战游戏
  10. 超声检测的A扫描、B扫描、C扫描