2019-10-05 03:06:34 +01:00
|
|
|
# git lfs
|
|
|
|
|
|
|
|
> Work with large files in Git repositories.
|
2024-05-23 11:48:45 +01:00
|
|
|
> More information: <https://git-lfs.com>.
|
2019-10-05 03:06:34 +01:00
|
|
|
|
2022-06-27 11:23:12 +01:00
|
|
|
- Initialize Git LFS:
|
2019-10-05 03:06:34 +01:00
|
|
|
|
|
|
|
`git lfs install`
|
|
|
|
|
|
|
|
- Track files that match a glob:
|
|
|
|
|
|
|
|
`git lfs track '{{*.bin}}'`
|
|
|
|
|
|
|
|
- Change the Git LFS endpoint URL (useful if the LFS server is separate from the Git server):
|
|
|
|
|
|
|
|
`git config -f .lfsconfig lfs.url {{lfs_endpoint_url}}`
|
|
|
|
|
|
|
|
- List tracked patterns:
|
|
|
|
|
|
|
|
`git lfs track`
|
|
|
|
|
2020-12-04 12:37:44 +00:00
|
|
|
- List tracked files that have been committed:
|
2019-10-05 03:06:34 +01:00
|
|
|
|
|
|
|
`git lfs ls-files`
|
|
|
|
|
2020-03-06 18:48:14 +00:00
|
|
|
- Push all Git LFS objects to the remote server (useful if errors are encountered):
|
2019-10-05 03:06:34 +01:00
|
|
|
|
|
|
|
`git lfs push --all {{remote_name}} {{branch_name}}`
|
2020-03-06 18:48:14 +00:00
|
|
|
|
|
|
|
- Fetch all Git LFS objects:
|
|
|
|
|
|
|
|
`git lfs fetch`
|
|
|
|
|
|
|
|
- Checkout all Git LFS objects:
|
|
|
|
|
|
|
|
`git lfs checkout`
|