> ## Content Index
> Fetch the complete content index at: https://davidzych.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Coloring your Git output
- URL: https://davidzych.com/coloring-your-git-output/
- Published: 2014-04-05T11:35:43.000Z
- Updated: 2026-11-19T17:31:56.000Z
- Author: David Zych
- Tags: .gitconfig, color, diff, git, output, status, #Import 2026-11-20 21:02

Do you sometimes have a hard time viewing the output of a Git command? Updating the colors might help! In Git, you can edit the config to change the color of the output. You can set colors per repository or globally. We’ll focus on the global config here. The global config can be edited either by using the `git config --global` command, or by editing your global `.gitconfig` file.

Starting with [Git 1.8.4](https://raw.github.com/git/git/master/Documentation/RelNotes/1.8.4.txt?ref=davidzych.com), you can set `color.ui auto` which will color the output with the default colors. You’re also able to set the colors manually if you’re so inclined. You are able to edit the colors of the `status`, `diff`, and `branch` commands.

There are 9 colors available:

| Color   |
| ------- |
| normal  |
| black   |
| red     |
| green   |
| blue    |
| yellow  |
| cyan    |
| magenta |
| white   |

If you choose to use the \`git config --global\` command, you edit the \`color.{command}.{property}\` property. For instance, to change the color of the untracked files listed in the status command to yellow:

```
git config --global color.status.untracked yellow

```

If you choose to edit the global file manually, the `.gitconfig` file can be found at these locations:

| OS                 | Path                           |
| ------------------ | ------------------------------ |
| Windows (Vista up) | C:/Users/{username}/.gitconfig |
| Mac                | $HOME/.gitconfig               |
| Linux              | \~/.gitconfig                  |

When editing the file, add a new \`\[color\]\` section for the command you want to edit followed by a list of the properties and colors.

```
[color "diff"]
    meta = yellow
    frag = magenta
    old = red
    new = green

[color "status"]
    added = yellow
    changed = green
    untracked = red

[color "branch"]
    current = green
    local = white
    remote = red

```