📜 ⬆️ ⬇️

GitHub announces storage for large files (LFS)

Recently on GitHub there was a pleasant news about the announcement of storage for large files:

“We are pleased to present Git Large File Storage (LFS) as a more practical way of working with large binary files, such as audio files, graphics, video, etc. in git.
Git LFS is a new open source extension that replaces large files with text links in Git, while the contents of the files are stored on remote servers as GitHub.com or GitHub Enterprise ” - GitHub.com


image

about the project


The Git LFS project is a collection of filters and hooks that handle large files instead of storing directly in Git. LFS tracks Git operations with large files through clean and smudge filters, as a result, files are not sent to the remote git repository, but are automatically saved on a third-party server using the LFS API, files are also automatically loaded when loading a branch from a remote git repository .
')
You can read more about what clean and smudge filters are in the official Git tutorial.

How it works


  1. Need to download and install an extension for Git from here .
  2. Select the type of files to store in LFS (or directly edit .gitattributes):
    git lfs track "*.psd" 
  3. Then you can work as usual in Git: first add, then commit and push. Like that:
      git add file.psd git commit -m "Add design file" git push origin master 


Conclusion


In general, this is the most beautiful thing, that working with LFS is no different from working with ordinary text files in the repository.

Full support for LFS in each repository on GitHub, if you believe the announcement, will appear within a few months.

However, access can be obtained now through the form of obtaining early access: Want to version large files with GitHub?

Project website: Git LFS

Source: https://habr.com/ru/post/255413/


All Articles