Git LFS
Project Setup
Git Large File Storage (LFS) replaces large files such as audio, video, datasets, and graphics with text pointers inside Git, while storing the actual file contents on a remote server.
You can install Git LFS using the following commands:
- Homebrew:
brew install git-lfs
- MacPorts:
port install git-lfs
- For Windows, go to this link
- Ubuntu:
sudo apt-get install git-lfs
Download and install the Git extension. After downloading and installing, configure Git LFS for your user account by running:
git lfs install
In each repository where you want to use Git LFS, choose the file types you’d like to manage with Git LFS (or directly edit .gitattributes
). You can set additional file extensions at any time.
git lfs track "*.psd"
git add .gitattributes
Note that specifying file types to be tracked by Git LFS does not automatically convert any previously existing files to Git LFS, such as files in other branches or in your previous history. For this, use the git lfs migrate
command, which has several options tailored to various use cases.
To view the file extensions currently tracked by Git LFS, use:
git lfs track
Then simply commit and push your changes to GitFlic, for example, if your current branch is main
:
git add file.psd
git commit -m "Add design file"
git push origin main
File Locking
GitFlic supports the LFS Lock
feature, allowing you to lock files and prevent other project participants from changing them. After locking, a lock icon will be displayed next to the file.
To use this feature, run git lfs lock {filename}
after you have used git lfs track
.
A message will be shown:
Locked {filename}
To unlock a file, use git lfs unlock {filename}
. The following message will be displayed:
Unlocked {filename}
Current Repository Limits
- Standard repository size: 4 GB
- The size of the initial commit equals the repository size
- Standard commit size: 100 MB
- You cannot upload a file larger than the current repository size (if the project is 100 MB, you cannot upload a file larger than 100 MB)
- File size cannot exceed 2 GB
Currently, LFS billing is under development. If you encounter difficulties with these limits or want to increase them, please contact support at support@gitflic.ru.
Possible Problems and Solutions
When uploading large projects (for example, when migrating from other services), you may encounter a problem where the connection drops after a while and the upload stops. In this case, run the following configuration command in your console: git config http.version HTTP/1.1
and try uploading again.
Automated translation!
This page was translated using automatic translation tools. The text may contain inaccuracies.