参考链接:

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. C# 开发AliYun(阿里云) 小蜜调用接口代码

    using System; using System.Collections.Generic; using Aliyun.Acs.Core; using Aliyun.Acs.Core.Excepti ...

  2. 【题解】Luogu P5284 [十二省联考2019]字符串问题

    原题传送门 我用sa做的本题 (码量似乎有点大) 先对原串建sa 考虑如何建图: 从大到小枚举长度len 先将height中等于len的两个位置在并查集合并起来,将lst也合并(lst是链表) 再将长 ...

  3. CEF 支持的命令行参数

    参考:https://peter.sh/experiments/chromium-command-line-switches/ List of Chromium Command Line Switch ...

  4. Hive性能优化上的一些总结

    https://blog.csdn.net/mrlevo520/article/details/76339075 1.介绍 首先,我们来看看Hadoop的计算框架特性,在此特性下会衍生哪些问题? 数据 ...

  5. Java类的加载和对象创建流程的详细分析

    相信我们在面试Java的时候总会有一些公司要做笔试题目的,而Java类的加载和对象创建流程的知识点也是常见的题目之一.接下来通过实例详细的分析一下: package com.test; public ...

  6. 极其简单的VSCode C++环境配置

    下载我打包的文件VSCode-cpp.7z.001 和 VSCode-cpp.7z.002,解压. 在系统环境变量中添加:你解压的路径\Project\.vscode\MinGW\bin. 打开你解压 ...

  7. unittest同时支持参数化和生成html报告

    最近在用python3.6+unittest+requests做自动化接口测试.发现一个问题,unittest中使用第3方插件parameterized进行参数化,再生成html报告时,运行就会失败. ...

  8. docker容器的时间同步

    好久没写博客了,有时间开始陆续整理一下工作中遇到的问题,今天罗列一下docker容器的时间同步问题 我们每次在run容器的时候,会存在时区不同的问题,这样对数据处理会有很大障碍,操作如下: 第一种方式 ...

  9. Unity自定义定时器,模拟协程,脱离MonoBehavior控制

    using System; using System.Collections.Generic; using System.Timers; public class PETimer { private ...

  10. Log4net详细说明

    1.概述 log4net是.Net下一个非常优秀的开源日志记录组件.log4net记录日志的功能非常强大.它可以将日志分不同的等级,以不同的格式,输出到不同的媒介.本文主要是介绍如何在Visual S ...