summaryrefslogtreecommitdiff
path: root/Documentation/config/color.txt
blob: e05d520a867490ce6b5388e2c48d1ce53de4e07e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
color.advice::
	A boolean to enable/disable color in hints (e.g. when a push
	failed, see `advice.*` for a list).  May be set to `always`,
	`false` (or `never`) or `auto` (or `true`), in which case colors
	are used only when the error output goes to a terminal. If
	unset, then the value of `color.ui` is used (`auto` by default).
 
color.advice.hint::
	Use customized color for hints.
 
color.blame.highlightRecent::
	This can be used to color the metadata of a blame line depending
	on age of the line.
+
This setting should be set to a comma-separated list of color and date settings,
starting and ending with a color, the dates should be set from oldest to newest.
The metadata will be colored given the colors if the line was introduced
before the given timestamp, overwriting older timestamped colors.
+
Instead of an absolute timestamp relative timestamps work as well, e.g.
2.weeks.ago is valid to address anything older than 2 weeks.
+
It defaults to 'blue,12 month ago,white,1 month ago,red', which colors
everything older than one year blue, recent changes between one month and
one year old are kept white, and lines introduced within the last month are
colored red.
 
color.blame.repeatedLines::
	Use the customized color for the part of git-blame output that
	is repeated meta information per line (such as commit id,
	author name, date and timezone). Defaults to cyan.
 
color.branch::
	A boolean to enable/disable color in the output of
	linkgit:git-branch[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. If unset, then the
	value of `color.ui` is used (`auto` by default).
 
color.branch.<slot>::
	Use customized color for branch coloration. `<slot>` is one of
	`current` (the current branch), `local` (a local branch),
	`remote` (a remote-tracking branch in refs/remotes/),
	`upstream` (upstream tracking branch), `plain` (other
	refs).
 
color.diff::
	Whether to use ANSI escape sequences to add color to patches.
	If this is set to `always`, linkgit:git-diff[1],
	linkgit:git-log[1], and linkgit:git-show[1] will use color
	for all patches.  If it is set to `true` or `auto`, those
	commands will only use color when output is to the terminal.
	If unset, then the value of `color.ui` is used (`auto` by
	default).
+
This does not affect linkgit:git-format-patch[1] or the
'git-diff-{asterisk}' plumbing commands.  Can be overridden on the
command line with the `--color[=<when>]` option.
 
color.diff.<slot>::
	Use customized color for diff colorization.  `<slot>` specifies
	which part of the patch to use the specified color, and is one
	of `context` (context text - `plain` is a historical synonym),
	`meta` (metainformation), `frag`
	(hunk header), 'func' (function in hunk header), `old` (removed lines),
	`new` (added lines), `commit` (commit headers), `whitespace`
	(highlighting whitespace errors), `oldMoved` (deleted lines),
	`newMoved` (added lines), `oldMovedDimmed`, `oldMovedAlternative`,
	`oldMovedAlternativeDimmed`, `newMovedDimmed`, `newMovedAlternative`
	`newMovedAlternativeDimmed` (See the '<mode>'
	setting of '--color-moved' in linkgit:git-diff[1] for details),
	`contextDimmed`, `oldDimmed`, `newDimmed`, `contextBold`,
	`oldBold`, and `newBold` (see linkgit:git-range-diff[1] for details).
 
color.decorate.<slot>::
	Use customized color for 'git log --decorate' output.  `<slot>` is one
	of `branch`, `remoteBranch`, `tag`, `stash` or `HEAD` for local
	branches, remote-tracking branches, tags, stash and HEAD, respectively
	and `grafted` for grafted commits.
 
color.grep::
	When set to `always`, always highlight matches.  When `false` (or
	`never`), never.  When set to `true` or `auto`, use color only
	when the output is written to the terminal.  If unset, then the
	value of `color.ui` is used (`auto` by default).
 
color.grep.<slot>::
	Use customized color for grep colorization.  `<slot>` specifies which
	part of the line to use the specified color, and is one of
+
--
`context`;;
	non-matching text in context lines (when using `-A`, `-B`, or `-C`)
`filename`;;
	filename prefix (when not using `-h`)
`function`;;
	function name lines (when using `-p`)
`lineNumber`;;
	line number prefix (when using `-n`)
`column`;;
	column number prefix (when using `--column`)
`match`;;
	matching text (same as setting `matchContext` and `matchSelected`)
`matchContext`;;
	matching text in context lines
`matchSelected`;;
	matching text in selected lines
`selected`;;
	non-matching text in selected lines
`separator`;;
	separators between fields on a line (`:`, `-`, and `=`)
	and between hunks (`--`)
--
 
color.interactive::
	When set to `always`, always use colors for interactive prompts
	and displays (such as those used by "git-add --interactive" and
	"git-clean --interactive"). When false (or `never`), never.
	When set to `true` or `auto`, use colors only when the output is
	to the terminal. If unset, then the value of `color.ui` is
	used (`auto` by default).
 
color.interactive.<slot>::
	Use customized color for 'git add --interactive' and 'git clean
	--interactive' output. `<slot>` may be `prompt`, `header`, `help`
	or `error`, for four distinct types of normal output from
	interactive commands.
 
color.pager::
	A boolean to specify whether `auto` color modes should colorize
	output going to the pager. Defaults to true; set this to false
	if your pager does not understand ANSI color codes.
 
color.push::
	A boolean to enable/disable color in push errors. May be set to
	`always`, `false` (or `never`) or `auto` (or `true`), in which
	case colors are used only when the error output goes to a terminal.
	If unset, then the value of `color.ui` is used (`auto` by default).
 
color.push.error::
	Use customized color for push errors.
 
color.remote::
	If set, keywords at the start of the line are highlighted. The
	keywords are "error", "warning", "hint" and "success", and are
	matched case-insensitively. May be set to `always`, `false` (or
	`never`) or `auto` (or `true`). If unset, then the value of
	`color.ui` is used (`auto` by default).
 
color.remote.<slot>::
	Use customized color for each remote keyword. `<slot>` may be
	`hint`, `warning`, `success` or `error` which match the
	corresponding keyword.
 
color.showBranch::
	A boolean to enable/disable color in the output of
	linkgit:git-show-branch[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. If unset, then the
	value of `color.ui` is used (`auto` by default).
 
color.status::
	A boolean to enable/disable color in the output of
	linkgit: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. If unset, then the
	value of `color.ui` is used (`auto` by default).
 
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),
	`nobranch` (the color the 'no branch' warning is shown in, defaulting
	to red),
	`localBranch` or `remoteBranch` (the local and remote branch names,
	respectively, when branch and tracking information is displayed in the
	status short-format), or
	`unmerged` (files which have unmerged changes).
 
color.transport::
	A boolean to enable/disable color when pushes are rejected. May be
	set to `always`, `false` (or `never`) or `auto` (or `true`), in which
	case colors are used only when the error output goes to a terminal.
	If unset, then the value of `color.ui` is used (`auto` by default).
 
color.transport.rejected::
	Use customized color when a push was rejected.
 
color.ui::
	This variable determines the default value for variables such
	as `color.diff` and `color.grep` that control the use of color
	per command family. Its scope will expand as more commands learn
	configuration to set a default for the `--color` option.  Set it
	to `false` or `never` if you prefer Git commands not to use
	color unless enabled explicitly with some other configuration
	or the `--color` option. Set it to `always` if you want all
	output not intended for machine consumption to use color, to
	`true` or `auto` (this is the default since Git 1.8.4) if you
	want such output to use color when written to the terminal.