Reputation: 1081
I tried to make colors a bit different while displaying status info, but I did manage to ruin something. When I type git status to see my unstaged files and stuff, the reply is : fatal: bad numeric config value 'blue' for 'color.status' in C:/....=gitconfig: invalid unit add and commit work still. How can i reset my settings? (I am new to git) Thanks for the answers!
Upvotes: 0
Views: 1968
Reputation: 9792
Run git config --global color.status always
.
I think you accidentally set it to an invalid value.
Quoting the man page (readable in man git-config
or on the git-scm site):
color.status
A boolean to enable/disable color in the output of git-status(1).
May be set to always, false (or never) or auto (or true), in which
case colors are used only when the output is to a terminal.
Defaults to false.
UPDATE:
Here are some examples to set the individual colors:
git config --global color.status.added magenta
git config --global color.status.changed blue
git config --global color.status.untracked yellow
And the docs for color.status.<slot>
:
Use customized color for status colorization.
<slot>
is one of header (the header text of the status message), added or updated (files which are added but not committed), changed (files which are changed but not added in the index), untracked (files which are not tracked by Git), branch (the current branch), or nobranch (the color the no branch warning is shown in, defaulting to red).
And info about the possible color values:
The value for these configuration variables is a list of colors (at most two) and attributes (at most one), separated by spaces. The colors accepted are normal, black, red, green, yellow, blue, magenta,cyan and white; the attributes are bold, dim, ul, blink and reverse. The first color given is the foreground; the second is the background. The position of the attribute, if any, doesn't matter.
Colors (foreground and background) may also be given as numbers between 0 and 255; these use ANSI 256-color mode (but note that not all terminals may support this).
Upvotes: 1