git-lfs-track man page

git-lfs-track — View or add Git LFS paths to Git attributes

Synopsis

git lfs track [options] [pattern...]

Description

Start tracking the given patterns(s) through Git LFS. The pattern argument is written to .gitattributes. If no paths are provided, simply list the currently-tracked paths.

The gitattributes documentation https://git-scm.com/docs/gitattributes states that patterns use the gitignore pattern rules https://git-scm.com/docs/gitignore to match paths.

Options

Examples

List the patterns that Git LFS is currently tracking:

git lfs track

Configure Git LFS to track GIF files:

git lfs track "*.gif"

Configure Git LFS to track PSD files and make them read-only unless locked:

git lfs track --lockable "*.psd"

See Also

git-lfs-untrack(1), git-lfs-install(1), gitattributes(5), gitignore(5).

Part of the git-lfs(1) suite.

Referenced By

git-lfs(1), git-lfs-post-checkout(1), git-lfs-post-merge(1), git-lfs-untrack(1).

July 2019