参考链接:

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. Java链接MySQL数据库的用配置文件和不用配置文件的代码

    1.利用配置文件(db.properties)链接MySQL数据库 package tool; import java.io.FileInputStream;import java.sql.Conne ...

  2. windows服务加定时器实现

    首先在项目中添加windows服务 然后双击“MainService.cs”,在上面点右键“打开代码” 以下是我的实例代码 partial class MainService : ServiceBas ...

  3. Spark机器学习基础三

    监督学习 0.线性回归(加L1.L2正则化) from __future__ import print_function from pyspark.ml.regression import Linea ...

  4. PowerShell自定义函数定义及调用

    PowerShell是一种命令集,也有自己的语法定义及函数.本文主要介绍如何自定义powershell函数及如何调用,当初在写PowerShell自定义函数的时候查阅了很多资料都没找到如何调用自定义函 ...

  5. hp quicktestprofession ver-10.0(QTP)的入门使用指南

    ---恢复内容开始--- SQA(software quality assurance) tool hp quicktestprofession ver-10.0(QTP) environment w ...

  6. Django troubleshootings

    当在云服务器上部署Django服务时: 1. 首先要在云上的主机上添加相应的端口访问权限. 2. 在project下面的urls.py里面设置如下: ALLOWED_HOSTS = ['www.aby ...

  7. Vue-admin工作整理(二):项目结构个人配置

    通过上一篇文章(Vue-admin工作整理(一):项目搭建)操作完毕后,基础项目已经搭建,下面就要对项目本身进行一下项目结构调整来符合自己的项目要求 1.首先要对package.json文件进行调整, ...

  8. 网球pt站 T3nnis 情况说明

    网球收藏爱好者们一定知道这个站,网球界的海德堡. 但想进的人发现没什么办法.满世界的找门路.那我说一下具体的情况吧. ************************************ 更新:现 ...

  9. 一张图了解Spring Cloud微服务架构

    Spring Cloud作为当下主流的微服务框架,可以让我们更简单快捷地实现微服务架构.Spring Cloud并没有重复制造轮子,它只是将目前各家公司开发的比较成熟.经得起实际考验的服务框架组合起来 ...

  10. 《javascript经典入门》-day02

    <javascript经典入门>-day02 1.使用函数 1.1基本语法 function sayHello() { aler('Hello'); //...其他语句... } #关于函 ...