git config --global color.ui auto

Category: Git - Core

git config --global color.ui auto

Enable colored output in terminals

Turns on color for Git output when writing to a terminal, and off when piping to a file or another program. The auto mode keeps scripts free of escape codes. It is a long-standing default in modern Git but can be set explicitly.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.