Skip to main content
explain the difference from auto and always
Source Link
Evgeny Zislis
  • 3.3k
  • 1
  • 16
  • 7

You probably want to use

git config --global color.ui auto

The auto part says that git will only try and use color on terminals that support it, and you will not get ANSI sequences if you redirect output of git commands to a file for example. Setting it to true is same as auto, and this is also the default since Git 1.8.4.

The color.ui is a meta configuration that includes all the various color.* configurations available with git commands.

This is explained in-depth in git help config.

When color.ui is set to always it will always emit ANSI color characters, even when piping the output like git log | less while when set to auto it will not print colors unless the output is to the terminal.

You probably want to use

git config --global color.ui auto

The auto part says that git will only try and use color on terminals that support it, and you will not get ANSI sequences if you redirect output of git commands to a file for example. Setting it to true is same as auto, and this is also the default since Git 1.8.4.

The color.ui is a meta configuration that includes all the various color.* configurations available with git commands.

This is explained in-depth in git help config.

You probably want to use

git config --global color.ui auto

The auto part says that git will only try and use color on terminals that support it, and you will not get ANSI sequences if you redirect output of git commands to a file for example. Setting it to true is same as auto, and this is also the default since Git 1.8.4.

The color.ui is a meta configuration that includes all the various color.* configurations available with git commands.

This is explained in-depth in git help config.

When color.ui is set to always it will always emit ANSI color characters, even when piping the output like git log | less while when set to auto it will not print colors unless the output is to the terminal.

add note about this being the default since git 1.8.4
Source Link
Evgeny Zislis
  • 3.3k
  • 1
  • 16
  • 7

You probably want to use

git config --global color.ui auto

The auto part says that git will only try and use color on terminals that support it, and you will not get ansiANSI sequences if you redirect output of git commands to a file for example. Setting it to true is same as auto, and this is also the default since Git 1.8.4.

The color.ui is a meta configuration that includes all the various color.* configurations available with git commands.

This is explained in-depth in git help config.

You probably want to use

git config --global color.ui auto

The auto part says that git will only try and use color on terminals that support it, and you will not get ansi sequences if you redirect output of git commands to a file for example.

The color.ui is a meta configuration that includes all the various color.* configurations available with git commands.

This is explained in-depth in git help config.

You probably want to use

git config --global color.ui auto

The auto part says that git will only try and use color on terminals that support it, and you will not get ANSI sequences if you redirect output of git commands to a file for example. Setting it to true is same as auto, and this is also the default since Git 1.8.4.

The color.ui is a meta configuration that includes all the various color.* configurations available with git commands.

This is explained in-depth in git help config.

Source Link
Evgeny Zislis
  • 3.3k
  • 1
  • 16
  • 7

You probably want to use

git config --global color.ui auto

The auto part says that git will only try and use color on terminals that support it, and you will not get ansi sequences if you redirect output of git commands to a file for example.

The color.ui is a meta configuration that includes all the various color.* configurations available with git commands.

This is explained in-depth in git help config.