The [lfs] Command
Work with large files in Libra repositories
Usage
libra lfs <COMMAND> [<args>]
Description
Libra LFS is a system for managing and versioning large files in association with a Libra repository.
Instead of storing the large files within the Libra repository as blobs, Libra LFS stores special "pointer files" in the repository, while storing the actual file contents on an LFS server.
The contents of the large file are downloaded automatically when needed, for example when a branch containing the large file is checked out.
Commands
track [PATTERN]...
View or add LFS paths to Libra Attributes (root)
Start tracking the given patterns(s) through Libra LFS. The argument is
written to .libra_attributes. If no paths are provided, simply list the
currently-tracked paths.
Like: libra lfs track "*.png"
untrack <PATTERN>...
Remove LFS paths from Libra Attributes (root).
Stop tracking the given pattern(s) through Libra LFS.
Nothing will happen if the pattern is not currently being tracked (in .libra_attribute).
locks
List currently "locked" files from the Libra LFS server.
lock <PATH>
Set a file as "locked" on the Libra LFS server.
String path name of the locked file. This should be relative to the root of the repository working directory.
Once locked, LFS will verify that Git pushes do not modify files locked by other users.
unlock <PATH>
Remove a "locked" file from the Libra LFS server.
Options
-f
,--force
- Tells the server to remove the lock, even if it's owned by another user.-i <ID>
,--id <ID>
- Specifies a lock by its ID instead of path.
ls-files
Show information about Libra LFS files in the index and working tree.
Note:
The lfs
command only support root level tracking, and the root .libra_attributes
file is used to store the tracking information.
Libra LFS is mainly designed for monorepo, which has different LFS server discovery mechanism from git-lfs. However, it made special support for GitHub and Gitee.