git-lfs-track man page

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


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


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 states that patterns use the gitignore pattern rules to match paths.



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