How to wrap git commit comments?

后端 未结 15 1971
野性不改
野性不改 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:22

    SHORT ANSWER:
    Type -S then Enter when viewing the git log.

    DETAILED ANSWER:
    git log outputs using the less text viewer, so simply type -S then Enter to toggle between the two line-wrapping modes of "Chop long lines" and "Fold long lines." The "Fold long lines" option enables word wrap.

    Source that helped me learn this: https://superuser.com/a/272826/425838

提交回复
热议问题