参考链接:

1,https://blog.csdn.net/shiren1118/article/details/7761203

2,http://www.cnblogs.com/xwdreamer/archive/2012/05/29/2523958.html

To github.com:zhuchangli/generatorSqlmapCustom.git

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

error: failed to push some refs to 'git@github.com:zhuchangli/generatorSqlmapCustom.git'

hint: Updates were rejected because the tip of your current branch is behind

hint: its remote counterpart. Integrate the remote changes (e.g.

hint: 'git pull ...') before pushing again.

hint: See the 'Note about fast-forwards' in 'git push --help' for details.

错误操作流程是:

在idea上完成了工程,在提交git

git add.

git commit -m "×××××"

git push -u origin master

就出错了我的出错原因和链接1是一样的,

使用:git push -u origin master -f  搞定

但是有提示本人未实测,操作需要小心:

勾选强制覆盖已有的分支(可能会丢失改动)

git push后出错的更多相关文章

  1. “git push”后返回“Error 403”解决方法

    问题描述: 1,mac ox系统,terminal上运行命令git push出现403错误: 2,代码是在别人的github(暂且叫origin branch吧)上克隆的,修改和添加了部分代码后欲提交 ...

  2. git push后出现错误 ![rejected] master -> master(non-fast-forward) error:failed to push some refs to 'XXX'

    本地创建了一个project并在GitHub上创建了一个仓库,想要将本地的仓库链接到远程仓库我用的是如下方法:git init    //初始化本地仓库git remote add origin XX ...

  3. git push后修改错误的commit message

    Easiest solution (but please read this whole answer before doing this): git rebase -i <hash-of-co ...

  4. git push 后 链接总是灰色点击没有反应

    情况描述: mymon是openfalcon的监控mysql插件,从GitHub拉下来后,改动源码后,提交到公司内部的gitlab上,发现提交上去的图标总是灰色的,点击进不去,如下图所示.怎么解决? ...

  5. git push后自动部署

    前提,服务器已经装好ssh,本地也已经将ssh 公钥传到服务器对应位置 先用 pbcopy < ~/.ssh/PRIVATE_KEY.pub 将公钥复制到剪贴板:通过 ssh USER@SERV ...

  6. git push后是空目录,且提示modified content, untracked content

    最近往自己的github传代码时,每一步都正常,但最后push上去之后是空目录,且在本地执行git status时提示: 后来发现是由于push的工程下本来就有个.git目录,所以才导致push上去的 ...

  7. [译]git push

    push就是把你本地仓储的commit传到远程仓储中去. 用法 git push <remote> <branch> push指定的分支到<remote>中去.   ...

  8. git push 远程新分支

    git clone #从远程克隆 进行一些编辑后 git add . git commit -m "xxx" git push #将master推送到master git chec ...

  9. git push and git pull

    原文链接 git push 通常对于一个本地的新建分支,例如git checkout -b develop, 在develop分支commit了代码之后,如果直接执行git push命令,develo ...

随机推荐

  1. 翻译 | Improving Distributional Similarity with Lessons Learned from Word Embeddings

    翻译 | Improving Distributional Similarity with Lessons Learned from Word Embeddings 叶娜老师说:"读懂论文的 ...

  2. oracle传输表空间相关

    1.convert tablespaceconvert tablespace源端库执行:convert tablespace 'TPS_DATA' to platform 'AIX-Based Sys ...

  3. linux准备工具VMware以及ubuntu

    链接:https://pan.baidu.com/s/1j7DZCmzOcC2rPAciHtZgkA 密码:et5s

  4. sort排序原理

    var array = [10,5,40,25,1000,1];   array.sort(compareFunction);   function compareFunction(a, b) {  ...

  5. javascript 之 面向对象【继承】

    继承:函数没有签名,无法实现接口继承.ECMAScript只支持实现继承 1/原型链 回顾:构造函数.原型和实例的关系? 回:每个构造函数都有一个原型对象.原型对象都包含一个指向构造函数的指针.实例都 ...

  6. P4630 [APIO2018] Duathlon 铁人两项

    思路 圆方树,一个点双中的所有点都可以被经过,所以给圆点赋值-1,方点赋值为圆点个数,统计圆点两两之间的路径权值和即可 代码 #include <cstdio> #include < ...

  7. 面试被问之-----sql优化中in与exists的区别

    曾经一次去面试,被问及in与exists的区别,记得当时是这么回答的:''in后面接子查询或者(xx,xx,xx,,,),exists后面需要一个true或者false的结果",当然这么说也 ...

  8. python程序—利用socket监控端口

    利用socket监控服务器端口,端口不通时,发邮件提醒 import yagmail #导入yagmail模块 import re #导入re模块,进行正则匹配 import socket #导入so ...

  9. MySQL及navicat for mysql中文乱码

    转载自:https://www.cnblogs.com/mufire/p/6697994.html 修改完之后记着重启mysql服务,在服务里边重启,即可生效! 全部使用utf8编码 MySQL中文乱 ...

  10. webpack创建页面的过程

    1.项目文件夹中创建各类型文件放置的文件夹,如:iTestingWeb文件夹下创建src dist文件夹,用途:src为源码 dist为生成后的文件放置位置,然后在源码文件夹中进一步按文件类型增加文件 ...