Why do we need to optimize binary files in Git?
Let us consider a scenario now, Suppose you are working on a large-scale multi-modules project, and the project itself contains some large files or generates some large files in some of its phases.
But Github limits the size of files allowed in repositories. (A repository is a place where you can store your code, your files, and each file’s revision history.) If you exceed the per-file limit, the file will rejected silently by GIT LFS.
Optimizing Git for Large Binary Files
Version Control Systems are a category of software tools that help in recording changes made to files by keeping track of modifications done in the code.
Table of Content
- What is large binary files?
- The Challenge of Large Binary Files in Git
- Why do we need to optimize binary files in Git?
- Strategy for optimizing Git for Large Binary Files:
- Approach 1: Using Git LFS:
- Approach 2: Using Git-Annex
- Differences Between Git LFS and Git-Annex:
- Approach 3: Git-Submodules
Purpose of Version Control System:
- Multiple people can work simultaneously on a single project. Everyone works on and edits their copy of the files and it is up to them when they wish to share the changes made by them with the rest of the team.
- Version control provides access to the historical versions of a project. This is insurance against computer crashes or data loss. If any mistake is made, you can easily roll back to a previous version. It is also possible to undo specific edits that too without losing the work done in the meantime. It can be easily known when, why, and by whom any part of a file was edited.
Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. When you do actions in Git, nearly all of them only add data to the Git database.