Display last git commit comment

前端 未结 10 699
南旧
南旧 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:08

    For something a little more readable, run this command once:

    git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
    

    so that when you then run:

    git lg
    

    you get a nice readout. To show only the last line:

    git lg -1
    

    Solution found here

提交回复
热议问题