如何在不更改提交消息的情况下修改提交(重用前一个)? [英] How to amend a commit without changing commit message (reusing the previous one)?

查看:148
本文介绍了如何在不更改提交消息的情况下修改提交(重用前一个)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法修改一个没有 vi (或者你的 $ EDITOR )弹出的提交来修改你的提交消息,但只是重复使用以前的消息?

Is there a way to amend a commit without vi (or your $EDITOR) popping up with the option to modify your commit message, but simply reusing the previous message?

推荐答案

既然git 1.7.9版本,你也可以使用 git commit --amend --no-edit 来获得您的结果。

Since git 1.7.9 version you can also use git commit --amend --no-edit to get your result.

请注意,这不包括元数据其他提交,如时间戳,可能或可能不重要给你。

Note that this will not include metadata from the other commit such as the timestamp which may or may not be important to you.

这篇关于如何在不更改提交消息的情况下修改提交(重用前一个)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆