Home Explore Blog CI



git

1st chunk of `Documentation/config/color.adoc`
2f0f31331fe3ccda806d1309406fa65f1921682213f0f2970000000100000fa4
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::
	Specify the line annotation color for `git blame --color-by-age`
	depending upon the 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 with the
specified 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 specified color to colorize line annotations for
	`git blame --color-lines`, if they come from the same commit as the
	preceding line. 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,

Title: Git Configuration Settings for Color
Summary
The provided text describes various Git configuration settings related to color, including options for enabling or disabling color in different Git commands, customizing colors for specific parts of the output, and setting colors for hints, branches, diffs, and more.