Color in git-log

前端 未结 5 1356
灰色年华
灰色年华 2020-12-02 08:01

When you run git log --decorate --pretty=oneline the output will have entries like (HEAD, refs/published/master, master) with coloration.

I

5条回答
  •  有刺的猬
    2020-12-02 08:15

    Some may want to use this : %C(colorname) This doesn't need to change the color config.

    Example : Coloring the author name in yellow

    --pretty=format:"%C(yellow)%an%Creset"
    

    Regular ANSI colors should work https://en.wikipedia.org/wiki/ANSI_escape_code

    • black
    • red
    • green
    • yellow
    • blue
    • magenta
    • cyan
    • white

提交回复
热议问题