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