显示最后的git commit注释 [英] Display last git commit comment

查看:49
本文介绍了显示最后的git commit注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常在提交( $ git -commit -m" )期间,我希望阅读我的最后评论以记住我所取得的进展.有没有一种简单的方法可以通过命令行直接访问最后的提交消息?(我正在使用Windows.)

Often during a commit ($ git -commit -m ""), I wish to read my last comment to remember what progress I have made. Is there an easy way to directly access the last commit message through command-line? (I'm using Windows.)

推荐答案

git show

是键入速度最快的,但也会显示差异.

is the fastest to type, but shows you the diff as well.

git log -1

快速而简单.

git log -1 --pretty=%B

如果您只需要提交消息,而无需其他任何内容.

if you need just the commit message and nothing else.

这篇关于显示最后的git commit注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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