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