Git pretty format string equivalent of oneline, including colors -


i trying recreate git format setting of oneline format string (in order extend further).

so command

git log --format=oneline 

what format string equivalent of oneline? closest can is

git log --format="%h %d %s" 

however, not produce colors. know can hard code of them, commit hash. %d has dynamic colors, depending on shows.

turn on auto color

git log --format="%c(auto) %h %d %s" 

and output this

enter image description here

from git log documentation

%c(…): color specification, described in color.branch.* config option; adding auto, @ beginning emit color when colors enabled log output (by color.diff, color.ui, or --color, , respecting auto settings of former if going terminal). auto alone (i.e. %c(auto)) turn on auto coloring on next placeholders until color switched again.


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -