1. git-lfs-config(5)
  2. git-lfs-config(5)

NAME

git-lfs-config - Configuration options for git-lfs

CONFIGURATION FILES

git-lfs reads its configuration from any file supported by git config -l, including all per-repository, per-user, and per-system Git configuration files.

Additionally, a small number of settings can be specified in a file called .lfsconfig at the root of the repository; see the "LFSCONFIG" section for more details. This configuration file is useful for setting options such as the LFS URL or access type for all users of a repository, especially when these differ from the default. The .lfsconfig file uses the same format as .gitconfig.

If the .lfsconfig file is missing, the index is checked for a version of the file, and that is used instead. If both are missing, HEAD is checked for the file. If the repository is bare, only HEAD is checked. This order may change for checkouts in the future to better match Git's behavior.

Settings from Git configuration files override the .lfsconfig file. This allows you to override settings like lfs.url in your local environment without having to modify the .lfsconfig file.

Most options regarding git-lfs are contained in the [lfs] section, meaning they are all named lfs.foo or similar, although occasionally an lfs option can be scoped inside the configuration for a remote.

LIST OF OPTIONS

General settings

Transfer (upload / download) settings

These settings control how the upload and download of LFS content occurs.

Push settings

Fetch settings

Prune settings

Extensions

Other settings

LFSCONFIG

The .lfsconfig file in a repository is read and interpreted in the same format as the file stored in .git/config. It allows a subset of keys to be used, including and limited to:

The set of keys allowed in this file is restricted for security reasons.

EXAMPLES

Configure a custom LFS endpoint for your repository:

git config -f .lfsconfig lfs.url https://lfs.example.com/foo/bar/info/lfs

SEE ALSO

git-config(1), git-lfs-install(1), gitattributes(5)

Part of the git-lfs(1) suite.

  1. October 2021
  2. git-lfs-config(5)