用git push代码到csdn code的时候出现错误

error:failed to push some refs to …

Dealing with “non-fast-forward” errors

From time to time you may encounter this error while pushing:

$ git push origin master

To ../remote/

! [rejected] master -> master (non-fast forward)

error: failed to push some refs to ‘../remote/’

To prevent you from losing history, non-fast-forward updates were rejected

Merge the remote changes before pushing again. See the ‘non-fast forward’

section of ‘git push –help’ for details.

找了很多网上的答案都是

先把git的东西fetch到你本地然后merge后再push

$ git fetch
$ git merge

$ git pull 

都是错的,正确的是

$ git pull git@code.csdn.net:你的名字\……

一定要加 git@这

然后push

$ git push -u 名字 master

master代表主分支

最新文章

  1. css选择器
  2. java实现excel表格导出数据
  3. xcode相关配置
  4. Extjs 中column的renderer使用方法
  5. Sharepoint学习笔记—习题系列--70-573习题解析 -(Q107-Q110)
  6. 队列理论和队列网络模型 queueing theory and queueing network model
  7. word-pattern(mock)
  8. .net core 中的序列化和反序列化
  9. squid添加用户名密码认证
  10. ArcGIS动态文本
  11. (三)学习MVC之密码加密及用户登录
  12. 学渣也要搞 laravel(2)—— HTTP路由[1]篇
  13. android 小例之两列菜单关联
  14. 自定义的GitLab 头像无法正常显示以及URL总是指向localhost
  15. Hibernate与Jpa的关系(2)
  16. JAVA面试题(8)
  17. Codeforces 980E The Number Games 贪心 倍增表
  18. MySQL skip-character-set-client-handshake导致的一个字符集问题
  19. 《Linux就该这么学》第三天课程
  20. 深入理解mybatis原理, Mybatis初始化SqlSessionFactory机制详解(转)

热门文章

  1. [CSP-S模拟测试]:括号密码(贪心)
  2. 在xml文件中使用该控件
  3. Java九种基本数据类型,以及他们的封装类
  4. MongoDB通过JavaDriver执行shell命令,例如创建sharding collection
  5. npm-package-lock.json
  6. Windows Server系统定时任务备份ORACLE数据库
  7. 从输入url到页面展现的过程
  8. ES6中变量的解构赋值
  9. Python基本语法_变量作用域LEGB
  10. Jedis源码浅析