如何防止执行git commit --amend的对话框 [英] How can I prevent the dialog on doing git commit --amend

查看:102
本文介绍了如何防止执行git commit --amend的对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行时会弹出一个对话框:

There is a dialog that pops up on running:

git commit --amend

那要我查看邮件. 有没有办法忽略此对话框并保持与上次相同的消息?

That wants me to review the messages. Is there a way to omit this dialog and keep the same message as was provided last time?

推荐答案

--no-edit是您要寻找的

git commit --amend --no-edit

来自这篇文章:

将使用上一次提交的消息填充编辑器,并且包括--no-edit标志将使您可以对提交进行修改,而无需更改其提交消息.

The editor will be populated with the message from the previous commit and including the --no-edit flag will allow you to make the ammendment to your commit without changing its commit message.

这篇关于如何防止执行git commit --amend的对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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