Easiest solution (but please read this whole answer before doing this):

  1. git rebase -i <hash-of-commit-preceding-the-incorrect-one>(这里可以用要改的那次的hash,如果是前一两次也可以用HEAD^或者HEAD^^)
  2. In the editor that opens, change pick to reword on the line for the incorrect commit.
  3. Save the file and close the editor.
  4. The editor will open again with the incorrect commit message. Fix it.
  5. Save the file and close the editor.
  6. git push --force to update GitHub.

git push后修改错误的commit message的更多相关文章

  1. git push ERROR: missing Change-Id in commit message footer

    今天上传代码时候报告错误:$ git push origin HEAD:refs/for/branch*Counting objects: 7, done.Delta compression usin ...

  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”后返回“Error 403”解决方法

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

  4. (转)Git 提交的正确姿势:Commit message 编写指南

    Git 每次提交代码,都要写 Commit message(提交说明),否则就不允许提交. $ git commit -m "hello world" 上面代码的-m参数,就是用来 ...

  5. git 修改提交说明 commit message

    修改最近一次的提交说明 1.代码未推送到远程服务器 $ git commit --amend 此指令会打开文本编辑器,第二行就是提交说明,修改完后按 ctrl+x 退出,后面根据提示操作. 2.代码已 ...

  6. Git 提交的正确姿势:Commit message 编写指南

    http://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html Git 每次提交代码,都要写 Commit message( ...

  7. git push 时发生错误 error: src refspec master does not match any. error: failed to push some refs to

    很多相关解决办法都是最后要 push 到远端的 master 上,但很多其实要求不能把个人的修改内容直接 push 到 master 主分支. 因此,当我想将本地 feature/work1 分支的修 ...

  8. git push后出错

    参考链接: 1,https://blog.csdn.net/shiren1118/article/details/7761203 2,http://www.cnblogs.com/xwdreamer/ ...

  9. Git remote: ERROR: missing Change-Id in commit message

    D:\code\项目仓库目录>git push origin HEAD:refs/for/dev/wangteng/XXXXX key_load_public: invalid format E ...

随机推荐

  1. Oracle数据库自我总结(转)

    Oracle数据库自我总结 1.Oracle连接远程服务器,需要安装客户端的同时需要覆盖D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora ...

  2. 以管理员身份启动ClickOnce部署的应用程序

    ClickOnce方式部署应用简单方便,估计很多人都用过,但这种方式存在一定的“缺陷”,即以管理员方式启动应用的问题,虽然出于安全考虑可以理解,但给需要管理员权限才能正常运行的程序带来了一定的麻烦,这 ...

  3. AndroidAnnotations部署

    环境: 系统:windows 8 (64bit) 开发工具:Eclipse 3.8 JDK版本:jdk1.6 构建工具:Ant(Eclipse默认的build tool) androidannotat ...

  4. VS中调用SQL SERVER存储过程

     存储过程是经过编译的,永久保存在数据中的一组SQL语句,通过创建和使用存储过程能够提高程序的重用性和扩展性,为程序提供模块化的功能,还有利于对程序的维护和管理.以下就详谈一下,VB.NET怎样调 ...

  5. VisJS 随机图

    <!doctype html> <html> <head> <title>Random nodes</title> <style ty ...

  6. SVN的配置与调试

  7. 解决windows server 2003不认U盘或移动硬盘

    解决windows server 2003不认U盘或移动硬盘1.进入命令提示符环境(也就是DOS) 2.进入DISKPART程序 3.输入AUTOMOUNT ENABLE指令 4.OK,下次USB硬盘 ...

  8. debian安装mono环境

    官网 http://pkg-mono.alioth.debian.org/ 在/etc/apt/sources.list 加上 deb http://debian.meebey.net/pkg-mon ...

  9. 15 Linux Split and Join Command Examples to Manage Large Files--reference

    by HIMANSHU ARORA on OCTOBER 16, 2012 http://www.thegeekstuff.com/2012/10/15-linux-split-and-join-co ...

  10. WPF柱状图(支持数据库动态更新)

    之前我们讲到wpf组件基类以及组件开发,现在我们围绕之前的内容去开发一个组件. 效果图请加群查看,在群共享里面. 做出这个呢  是比较繁琐的. 首先要使用我们的基类 继承基类的模板自动生成如下几个文件 ...