在使用 Android Studio 对源代码进行push到码云时可出错,报错如下:

error: failed to push some refs to 'https://gitee.com/文件路径.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.

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

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

git pull --rebase origin master

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

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

最新文章

  1. Web 开发常见安全问题
  2. __stdcall,__cdecl,__fastcall的区别
  3. sql对应C#的类型
  4. Css3_浏览器支持
  5. delphi 基础之二 面向对象概念初步
  6. Ubuntu下开启ssh服务
  7. BZOJ 1083: [SCOI2005]繁忙的都市 kruskal
  8. gSoap客户端示例程序
  9. 个人作业2——英语学习APP案例分析(必应词典的使用)
  10. 为什么大家觉得自学HTML5难?
  11. 快速傅里叶变换 & 快速数论变换
  12. Interface Comparable<T>
  13. SQLI DUMB SERIES-21
  14. django 中自定义过滤器
  15. QT编程环境
  16. pygame
  17. Windows下安装 Memcache
  18. 【ElasticSearch】:elasticsearch.yml配置
  19. MyEclipse安装及破解步骤
  20. mysql的onestart和start区别

热门文章

  1. Xming+SecureCRT的安装与使用
  2. spring:事务的5大隔离级别,7大传播行为
  3. Java中的基本运算符
  4. mysql数据库常用命令入门
  5. 吴裕雄--天生自然python学习笔记:Python CGI编程
  6. 吴裕雄--天生自然KITTEN编程:青蛙答题过河
  7. 维生素D补充过多会中毒
  8. 爬虫入门-使用python写简单爬虫
  9. 如何理解TCP的三次握手协议?
  10. 对BFC的深层理解