Skip to content

Verify Git LFS Setup

When storing Enterprise Architect models in a Git Environment, you may encounter a situation where, after pulling a new branch, you have EA models that appear to be broken.

When inspecting these Enterprise Architect models further, you will notice all of the following:

  • Opening the Enterprise Architect Model with Enterprise Architect gives you this non-descript error message:

    Error

  • The file explorer notes the file size as 1 KB, whereas a EA model file is usually never smaller than 1.5 MB

  • Opening the file with a text editor gives you something similar to the following text instead of the binary gibberish that would give you on a normal .eap file:

    version https://git-lfs.github.com/spec/v1
    
    oid sha256:3d064691c879e76b9c34c657ddc3564bf4187c30f1861c709638603f9b469739
    
    size 1691648
    

If that's the case, you might have an issue with the Git Large File System, or LFS for short.

Activating Git LFS

The most likely cause for this issue is that someone added the model file to the git repository while using Git LFS, but you don't have GIT LFS activated on your machine.

Git LFS is usually part of any Git Installation and is therefore most likely already available on your machine. It is deactivated by default, though.

To activate it, we will adhere to the official guide (https://github.com/git-lfs/git-lfs/wiki/Installation).

First open up a git bash via the context menu in Windows Explorer in your git repository:

Git Bash Here

And run the following command in the command prompt:

git lfs install --local

This will activate Git LFS for the repository the command is run in.

However, this will not actually replace the "broken" link files in the repository with the correct ones. For that, we need to run a second command in the Git Bash:

git lfs pull

Afterwards, everything should be good to go.