如何在git中执行多行提交消息? [英] How to do a multiline commit message in git?

查看:84
本文介绍了如何在git中执行多行提交消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经做过一个单行提交消息了​​一段时间,但它没有提供有关提交的全部信息.

I have been doing a oneline commit message for some time now but it doesn't give the entire information on the commit.

git commit -m "message"

我曾经使用过git Gui工具,它可以选择执行多行提交消息.标题为一,详细信息为一.我们如何从命令行中做到这一点?

I once used git Gui tool and it had option to do multiline commit message. One in header and one in detail. How do we do it from the command line?

有人可以解释提交错误修复和新更改的任何好的做法吗?我通常在提交消息的开头写"NEW:"或"FIX",我想知道你们是怎么做到的?

And can some one explain any good practice to commit bug fix and new changes? I normally write "NEW:" or "FIX" at start of the commit message, i would like to know how you guys do this?

推荐答案

您可以从命令行执行:

git commit -m 'First line
Second line
Third line'

或者,您可以通过执行以下操作让git触发您的编辑器

Alternatively, you can just let git trigger your editor by doing

git commit

这篇关于如何在git中执行多行提交消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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