1GIT-LFS-TRACK(1)                                              GIT-LFS-TRACK(1)
2
3
4

NAME

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

SYNOPSIS

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

DESCRIPTION

12       Start tracking the given patterns(s) through Git LFS. The pattern argu‐
13       ment is written to .gitattributes. If no  paths  are  provided,  simply
14       list the currently-tracked paths.
15
16       The  gitattributes documentation https://git-scm.com/docs/gitattributes
17       states   that   patterns    use    the    gitignore    pattern    rules
18       https://git-scm.com/docs/gitignore to match paths. This means that pat‐
19       terns which contain asterisk (*), question mark (?),  and  the  bracket
20       characters  ([  and  ]) are treated specially; to disable this behavior
21       and treat them literally instead, use --filename or escape the  charac‐
22       ter with a backslash.
23

OPTIONS

25       ·   --verbose  -v:  If  enabled,  have git lfs track log files which it
26           will touch. Disabled by default.
27
28       ·   --dry-run -d: If enabled, have git lfs track  log  all  actions  it
29           would  normally  take  (adding  entries to .gitattributes, touching
30           files on disk, etc) without performing any mutative  operations  to
31           the disk.
32
33           git  lfs track --dry-run [files] also implicitly mocks the behavior
34           of passing the --verbose, and will log in greater detail what it is
35           doing.
36
37           Disabled by default.
38
39       ·   --filename  Treat  the  arguments as literal filenames, not as pat‐
40           terns. Any special glob characters in the filename will be  escaped
41           when writing the .gitattributes file.
42
43       ·   --lockable  -l  Make  the  paths ´lockable´, meaning they should be
44           locked to edit them, and will be made read-only in the working copy
45           when not locked.
46
47       ·   --not-lockable  Remove the lockable flag from the paths so they are
48           no longer read-only unless locked.
49
50       ·   --no-excluded Do not list patterns that are excluded in the output;
51           only list patterns that are tracked.
52
53       ·   --no-modify-attrs  Makes matched entries stat-dirty so that Git can
54           re-index files you wish to convert to  LFS.  Does  not  modify  any
55           .gitattributes file(s).
56
57
58

EXAMPLES

60       List the patterns that Git LFS is currently tracking:
61
62              git lfs track
63
64       Configure Git LFS to track GIF files:
65
66              git lfs track "*.gif"
67
68       Configure  Git  LFS  to  track PSD files and make them read-only unless
69       locked:
70
71              git lfs track --lockable "*.psd"
72
73       Configure Git LFS to track the file named project [1].psd:
74
75              git lfs track --filename "project [1].psd"
76

SEE ALSO

78       git-lfs-untrack(1), git-lfs-install(1), gitattributes(5), gitignore(5).
79
80       Part of the git-lfs(1) suite.
81
82
83
84                                 January 2020                 GIT-LFS-TRACK(1)
Impressum