Using git lfs to track files larger than 100MB


If you have a github repository files that are larger than 100MB they won't be tracked but git.

The solution is to install git lfs -

1. Download required version

2. If you have not yet initialise github repo type git init in command line or any other terminal of your choice

3. Try to commit, if there are any files larger than 100MB you will get warning, cancel commit and remember the file name

4. In command line type git lfs track "myfile.mp4" (that assume myfile.mp4 is larger than 100MB)

5. You can also use wildcard git lfs track "*.mp4" - that would add tracking to all mp4 files in your repository

6. Optional file modification. You can also open .gtattributes file in the main folder of your repository to add larger files that should stay on lfs server. An example:

*.mp4 filter=lfs diff=lfs merge=lfs -text

7. That's is, now all files below 100MB will be tracked on git and anything larger than 100MB will be tracked by git lfs.