1GIT-LFS-TRACK(1) General Commands Manual GIT-LFS-TRACK(1)
2
3
4
6 git-lfs-track - View or add Git LFS paths to Git attributes
7
9 git lfs track [options] [pattern...]
10
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
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 .gi‐
55 tattributes file(s).
56
57
58
60 List the patterns that Git LFS is currently tracking:
61
62
63 Configure Git LFS to track GIF files:
64
65
66 Configure Git LFS to track PSD files and make them read-only unless
67 locked:
68
69
70 Configure Git LFS to track the file named project [1].psd:
71
72
74 git-lfs-untrack(1), git-lfs-install(1), gitattributes(5), gitignore(5).
75
76 Part of the git-lfs(1) suite.
77
78
79
80 March 2021 GIT-LFS-TRACK(1)