Debian Codegraph @

docs/man/git-lfs.adoc

raw
1 = git-lfs(1)
2
3 == NAME
4
5 git-lfs - Work with large files in Git repositories
6
7 == SYNOPSIS
8
9 [source,role=synopsis,subs="verbatim,quotes"]
10 ----
11 *git lfs* _<command>_ [_<args>_]
12 ----
13
14 == DESCRIPTION
15
16 Git LFS is a system for managing and versioning large files in
17 association with a Git repository. Instead of storing the large files
18 within the Git repository as blobs, Git LFS stores special "pointer
19 files" in the repository, while storing the actual file contents on a
20 Git LFS server. The contents of the large file are downloaded
21 automatically when needed, for example when a Git branch containing the
22 large file is checked out.
23
24 Git LFS works by using a "smudge" filter to look up the large file
25 contents based on the pointer file, and a "clean" filter to create a new
26 version of the pointer file when the large file's contents change. It
27 also uses a `pre-push` hook to upload the large file contents to the Git
28 LFS server whenever a commit containing a new large file version is
29 about to be pushed to the corresponding Git server.
30
31 == COMMANDS
32
33 Like Git, Git LFS commands are separated into high level ("porcelain")
34 commands and low level ("plumbing") commands.
35
36 === High level porcelain commands
37
38 git-lfs-checkout(1)::
39 Populate working copy with real content from Git LFS files.
40 git-lfs-completion(1)::
41 Generate shell scripts for command-line tab-completion of Git LFS commands.
42 git-lfs-dedup(1)::
43 De-duplicate Git LFS files.
44 git-lfs-env(1)::
45 Display the Git LFS environment.
46 git-lfs-ext(1)::
47 Display Git LFS extension details.
48 git-lfs-fetch(1)::
49 Download Git LFS files from a remote.
50 git-lfs-fsck(1)::
51 Check Git LFS files for consistency.
52 git-lfs-install(1)::
53 Install Git LFS configuration.
54 git-lfs-lock(1)::
55 Set a file as "locked" on the Git LFS server.
56 git-lfs-locks(1)::
57 List currently "locked" files from the Git LFS server.
58 git-lfs-logs(1)::
59 Show errors from the Git LFS command.
60 git-lfs-ls-files(1)::
61 Show information about Git LFS files in the index
62 and working tree.
63 git-lfs-migrate(1)::
64 Migrate history to or from Git LFS
65 git-lfs-prune(1)::
66 Delete old Git LFS files from local storage
67 git-lfs-pull(1)::
68 Fetch Git LFS changes from the remote & checkout any required working tree
69 files.
70 git-lfs-push(1)::
71 Push queued large files to the Git LFS endpoint.
72 git-lfs-status(1)::
73 Show the status of Git LFS files in the working
74 tree.
75 git-lfs-track(1)::
76 View or add Git LFS paths to Git attributes.
77 git-lfs-uninstall(1)::
78 Uninstall Git LFS by removing hooks and smudge/clean filter configuration.
79 git-lfs-unlock(1)::
80 Remove "locked" setting for a file on the Git LFS server.
81 git-lfs-untrack(1)::
82 Remove Git LFS paths from Git Attributes.
83 git-lfs-update(1)::
84 Update Git hooks for the current Git repository.
85 git-lfs-version(1)::
86 Report the version number.
87
88 === Low level plumbing commands
89
90 git-lfs-clean(1)::
91 Git clean filter that converts large files to pointers.
92 git-lfs-filter-process(1)::
93 Git process filter that converts between large files and pointers.
94 git-lfs-merge-driver(1)::
95 Merge text-based LFS files
96 git-lfs-pointer(1)::
97 Build and compare pointers.
98 git-lfs-post-checkout(1)::
99 Git post-checkout hook implementation.
100 git-lfs-post-commit(1)::
101 Git post-commit hook implementation.
102 git-lfs-post-merge(1)::
103 Git post-merge hook implementation.
104 git-lfs-pre-push(1)::
105 Git pre-push hook implementation.
106 git-lfs-smudge(1)::
107 Git smudge filter that converts pointer in blobs to the actual content.
108 git-lfs-standalone-file(1)::
109 Git LFS standalone transfer adapter for file URLs (local paths).
110
111 == EXAMPLES
112
113 To get started with Git LFS, the following commands can be used.
114
115 . Setup Git LFS on your system. You only have to do this once per user
116 account:
117 +
118 ....
119 git lfs install
120 ....
121 . Choose the type of files you want to track, for examples all `ISO`
122 images, with git-lfs-track(1):
123 +
124 ....
125 git lfs track "*.iso"
126 ....
127 . The above stores this information in gitattributes(5) files, so that
128 file needs to be added to the repository:
129 +
130 ....
131 git add .gitattributes
132 ....
133 . Commit, push and work with the files normally:
134 +
135 ....
136 git add file.iso
137 git commit -m "Add disk image"
138 git push
139 ....