1. git-lfs-track(1)
  2. git-lfs-track(1)

NAME

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 states that patterns use the gitignore pattern rules to match paths. This means that patterns which contain asterisk (*), question mark (?), and the bracket characters ([ and ]) are treated specially; to disable this behavior and treat them literally instead, use --filename or escape the character with a backslash.

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"

Configure Git LFS to track the file named project [1].psd:

git lfs track --filename "project [1].psd"

SEE ALSO

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

Part of the git-lfs(1) suite.

  1. May 2022
  2. git-lfs-track(1)