Color git command line result

On CentOS, when i run git commands like “git status” or “git diff”, the result is shown with out any color. On Ubuntu, git always show result in color.

To make git result show in color, edit file

vi ~/.gitconfig

Add

Advertisement

[color]
  diff = auto
  status = auto
  branch = auto
  interactive = auto
  ui = true
  pager = true

Now git commands will show output with color.

Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement