How to wrap git commit comments?

后端 未结 15 1953
野性不改
野性不改 2020-12-01 01:01

Is there a way to wrap git commit comments (when viewed via git log), so they are not cut off at the end of the line? It seems like there should be a pretty sim

15条回答
  •  無奈伤痛
    2020-12-01 01:03

    So I was looking for a solution to a similar problem to this, and came across this question. In my case I'm running git show and I have 2 lines where the change is in a single word, towards the end of a very long line. I ended up solving this with a similar approach to how I do with git diff, using the --word-diff-regex option.

    git show --color --word-diff-regex="[^[:space:],]+" 55de9c954d5d74a185879d3441a69cc1889c00f1 |more

提交回复
热议问题