Large File Storage

Git is designed and optimized for working with plain text files and tracking changes from version to version. However, you might want to store other things than just text files into source control. Examples are images or binary files that should be included with your application at runtime. While these are valid use cases, out of the box they do not work very well with Git. To fix this, Large File Storage (LFS) was introduced.

Git LFS allows you to store, instead of the binary files themselves, a small text file that acts as a pointer to that file. Such a file contains a hash of the file so that the client can download the file when cloning or fetching changes and update the file when you update the binary file.

To work with Git LFS, you must install the LFS client next to the Git client. This is a separate client that every user of the repository must download. Without this client, other users will only see the pointer files instead of the actual binary files. After installing the client, you must prepare the repository for the use of LFS. The following example commands enable the use of LFS for MP4 files:

git lfs install
git lfs track "*.mp4"
git add .gitattributes

From here onward, you can work with MP4 files just as any file and behind the scenes, they will be stored separate from your text file changes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.130.13