用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代表主分支

git上传代码到code.csdn.net出错的更多相关文章

  1. git上传代码到code.csdn.net

    国内有code.csdn.net速度很快 用git上传需要去下载git程序 很简单. 我是Windows下 先code.csdn.net创建一个项目 https://code.csdn.net/das ...

  2. VSCode通过git上传代码

    最近也是在不断学习中,接触VSCode时间不长,很多东西也是在学习,所以这里记录下VSCode通过git上传代码,以防之后忘记. 我用的的VSCode版本 起初建立仓库的时候通过命令:(这个是我网上搜 ...

  3. Git上传代码遇到的报错

    Git上传代码遇到的报错 1.git上传代码卡住(Total 7072 (delta 2508), reused 6844 (delta 2376), pack-reused 0) git confi ...

  4. git上传代码到github

    git上传代码到github [root@bigdata-hadoop- ~]# git init [root@bigdata-hadoop- ~]# git add zeppelin [root@b ...

  5. Ubuntu 中使用git 上传代码

    现在很多人都愿意把自己的代码分享给大家,所以有很多的代码管理的软件 ,比如SVN Git 等软件.今天就讲一下  git 的简单的应用,上传代码.用 git 上传代码 要有个git 账号,这是必不少的 ...

  6. 用git上传代码到新浪云

    新浪云空间是国内免费的一个空间,不过有限制很多. 申请新浪云需要新浪账号,注册略. 使用新浪账号去http://sae.sina.com.cn申请一个空间 选择新建应用 可以选择使用php项目 管理应 ...

  7. 如何用git上传代码到github详细步骤

    注册账户 这个小菜鸟带着心跳写的第一篇博客! 还请大家多多提点! 想使用github,第一步肯定是要注册github账号,有了账号就是直接登录啦 可以直接打开http://github.com页面注册 ...

  8. 初次使用git上传代码到github远程仓库

    https://blog.csdn.net/loner_fang/article/details/80488385 2018年05月28日 21:02:31 蒲公英上的尘埃 阅读数:697 因为最近在 ...

  9. 怎样用git上传代码到github以及如何更新代码

    上传代码: 1.进入指定文件夹: cd 指定文件夹 2.初始化git仓库: git init 3.将项目所有文件添加到暂存区: git add . 4.提交到仓库: git commit -m &qu ...

随机推荐

  1. [LeetCode]-DataBase-Combine Two Tables

    Table: Person +-------------+---------+ | Column Name | Type | +-------------+---------+ | PersonId ...

  2. tensorflow源码分析——LSTMCell

    LSTMCell 是最简单的LSTMCell,源码位于:/tensorflow/contrib/rnn/python/ops/core_rnn_cell_impl.py.LSTMCell 继承了RNN ...

  3. java数字加密算法

    数字加密在项目中时常会遇到,如手机号,身份证号信息等,下面小白将自己手写的数字加密算法分享给大家,可在项目中直接运用.加密规则,入参时传递一个字段时间戳 time:* 1.以字母代替数字,0-9分别为 ...

  4. HAProxy、Keepalived 在 Ocatvia 的应用实现与分析

    目录 文章目录 目录 Amphora 启动 keepalived 启动 haproxy 最后 Amphora 创建一个 loadbalancer 需要占用一到两台 Amphora Instance 作 ...

  5. Python Module_pdb_DEBUG 方法

    目录 目录 pdb pdb 的 Debug 方式 pdb 的调试指令 示例 IPython 自带的 Debug 工具 ipdb pdb pdb 是 Python 自带的程序包,为 Python 程序提 ...

  6. 阶段3 1.Mybatis_11.Mybatis的缓存_4 mybatis一对多实现延迟加载

    改成单表查询 首先配置的是select.他需要配置的值是accountDao中的方法,查询所有的账户,但是必须有条件.根据用户的id column配置的是id.因为要用user表的id去关联查询 Ac ...

  7. oracle-只读数据文件的备份与恢复

    11 只读数据文件的备份与恢复 只读数据文件是只读表空间的数据文件,数据块包括文件头在内部允许更改 SQL> alter tablespace yhqt read only; SQL> a ...

  8. oracle ogg 单实例双向复制搭建(oracle-oracle)--Oracle GoldenGate

    oracle ogg 单实例双向复制搭建(oracle-oracle)--Oracle GoldenGate --继昨天的测试,这一篇实施单实例双向复制(完全重新搭建) --环境不变 db1,db2( ...

  9. $destroy——angular

    参考资料:[http://odetocode.com/blogs/scott/archive/2013/07/16/angularjs-listening-for-destroy.aspx]

  10. 【ABAP系列】SAP ABAP DOI展示EXCEL或WORD

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP系列]SAP ABAP DOI展示EX ...