Skip to content

git large file system (LFS)

Martin Shetty edited this page May 4, 2021 · 1 revision

Setting up LFS

If you are using Git for Windows, it includes LFS by default, so you don't have to do this.

Before you clone the repository to your local machine, you must install git-lfs. We have many large binary files related to CAD and PCB design which are tracked using the Git Large File Storage extension (henceforth LFS). If you do not have LFS installed, those files will not be cloned to your local file system correctly. You will also be unable to commit similar files correctly.

You can install git-lfs with either apt or brew depending on your system.

After this, you can clone the repository as usual and the LFS-tracked files will be downloaded correctly

git clone [email protected]:RespiraWorks/Ventilator.git

For special cases when you do want to clone only the (mostly) text-based parts of the repository, ignoring the LFS content, this can still be done using

GIT_LFS_SKIP_SMUDGE=1 git clone [email protected]:RespiraWorks/Ventilator.git

Already cloned?

If you are new to the project and you jumped the gun and cloned the repo without LFS, you can still correct this. Install git-lfs as above and now in your repo directory run the following to bring in the missing files:

git lfs pull

LFS migration fallout

If you are already a contributor, our recent migration to LFS may have invalidated your local copy. Should you discover yourself unable to pull master, try

 git reset --hard origin

For more details on the LFS migration, check out issue #863.