Git 1,932 colors its output when it writes to a terminal and stays plain when it writes to a pipe or a file; that is what color.ui auto, the default since Git 1.8.4, means. Colors are ANSI escape sequences, which you can see by forcing them into a pipe:
git config set --global color.ui auto
git -c color.ui=always branch --list main | cat -v
git config set --global tag.sort version:refname
git config set --global versionsort.suffix -
git tag --list 'v1.1*'* ^[[32mmain^[[m v1.1.0-rc.0 v1.1.0 v1.1.1
^[[32m switches to green and ^[[m resets, which is why color.ui always in a configuration file breaks scripts that parse Git's output; color.<command>.<slot> tunes single parts. The tag settings fix a classic annoyance: sorted as text, v1.1.0-rc.0 comes after v1.1.0; sorted by version, with - marking a prerelease, it comes first.
Also worth knowing: branch.sort -committerdate lists recent branches first, log.date iso changes every date, pretty.<name> defines a reusable --format, and diff.colorMoved zebra marks moved lines.