git提交时的message和description
前言
git提交时会有两个信息可能需要填写,一个是message,一个是description,这两者的区别在哪里呢?
正文
谷歌的答案:
第一行可以理解为是title,其余的是description,这个定义看个人喜欢,所以一般提交时加一个"-m",其实只是提交了title,其实是可以加多个的。
再参考git的官网:
Though not required, it’s a good idea to begin the commit message with a single short (less than 50 character) line summarizing the change, followed by a blank line and then a more thorough description. The text up to the first blank line in a commit message is treated as the commit title, and that title is used throughout Git. For example, git-format-patch[1] turns a commit into email, and it uses the title on the Subject line and the rest of the commit in the body.
参考
https://stackoverflow.com/questions/16122234/how-to-commit-a-change-with-both-message-and-description-from-the-command-li
https://git-scm.com/docs/git-commit
posted on 2019-12-15 17:05 chaiyu2002 阅读(415) 评论(0) 编辑 收藏 举报