git: Show index diff in commit message as comment

前端 未结 5 617
清歌不尽
清歌不尽 2021-01-30 05:10

When git commit open the message editor is shows a brief status, something like this:

# Please enter the commit message for your changes. Lines star         


        
5条回答
  •  执念已碎
    2021-01-30 05:24

    If you want to always see the diff when you commit, you can add the following to your ~/.gitconfig file:

    [alias]
    commit = commit -v
    

提交回复
热议问题