Skip to content
Tutorials Center
My learning

Topics

Git Reference ยท Configuration Options

feature.* settings

Reference for feature.manyFiles and feature.experimental: bundles of performance settings that Git turns on together, what they change, and how to override one.

A feature.* variable is a switch that turns on a whole group of other settings at once. Instead of learning five separate keys that speed up a big repository, you set one, and Git applies sensible defaults for all of them. Any setting you also configure explicitly still wins over the bundle, so you can adjust one detail without giving up the rest.

There are two bundles. feature.manyFiles targets repositories with many thousands of tracked files. feature.experimental opts you into behavior that is expected to become a default later but is not yet; it can change between releases.

Terminal
git config feature.manyFiles true
git config --global feature.experimental true

Try it

Bash What feature.manyFiles changes

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with read or cat), it gets the next line from this box.

Bash An explicit setting beats the bundle

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with read or cat), it gets the next line from this box.

Syntax

Terminal
git config feature.manyFiles <true | false>
git config feature.experimental <true | false>
Bundle Settings it turns on
feature.manyFiles index.version=4 (path-prefix compression of the index, a smaller file that is faster to read and write) and core.untrackedCache=true (remembers the state of directories so git status skips unchanged ones).
feature.experimental A changing set of options for features that are still being evaluated. In recent releases it includes fetch.negotiationAlgorithm=skipping, which makes fetch negotiation faster when the repositories have long divergent histories.

Edge cases: the order of precedence for any one setting is: an explicit key in config, then the feature.* bundle, then the built-in default. An index that already exists keeps its old version until it is rewritten from scratch, for example with git update-index --index-version 4.

Usage notes

  • feature.manyFiles is cheap to try. Version 4 indexes are readable by every current Git, but very old versions and some third-party tools (libraries that parse .git/index themselves) cannot read them. If a tool complains about the index, check this first.
  • The untracked cache depends on the file system. It relies on directory modification times being reliable. Run git update-index --test-untracked-cache to check that your file system behaves. Network file systems sometimes fail the test.
  • Combine it with a file-system monitor for the biggest gain on large work trees: see core.fsmonitor. Scalar enables a tuned set of these options for you.
  • Do not enable feature.experimental on shared machines or in CI unless you want to follow Git's internal changes. The set of settings behind it is documented per release and can change without a deprecation period.
  • Look at the effective values with git config --show-origin --get-regexp feature to see where a bundle was switched on. Individual settings turned on by a bundle do not show in git config --list, because the bundle changes defaults inside Git rather than writing keys.
  • Not for small repositories. Below a few thousand files you will not notice a difference, and the extra index metadata only adds complexity.
  • Related bundles in other places: git maintenance has its own maintenance.strategy presets, and scalar clone applies a set of options at clone time.