Display last git commit comment

前端 未结 10 687
南旧
南旧 2020-12-02 03:36

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

10条回答
  •  臣服心动
    2020-12-02 04:28

    If you want to see just the subject (first line) of the commit message:

    git log -1 --format=%s
    

    This was not previously documented in any answer. Alternatively, the approach by nos also shows it.

    Reference:

    • git log - emsem

提交回复
热议问题