Git - Commit Large Files

Camilo Diaz

Introduction

Git is a great versioning control system that allows you to store and keep history of source code and other files.  GitHub is a web application that allows you to create repositories and store your git projects. However, GitHub only supports committing files less than 100MB. There are cases where files are easily over that amount ( i.e obj files ), and you need to keep track of those files. The way to workaround this is using Git Large File system support. You can find all documentation in the given link, but here's an example.

git add file.obj

git commit -m "Add model file"

  git push origin main

Previous versions of Git LFS complained about adding files that have been previously staged. This means you staged the files before tracking them. This fix was difficult and it required to rollback some commits and create a new HEAD for your repository. This is not truth for newer versions of LFS. If you are receiving errors related to previous staged files just make sure to upgrade your LFS.