Working with git LFS and gitpod

Hi everyone,

For the last weeks, I have been building an application that uses some large python packages. When I use viktor-cli install, the required packages are installed, and I can test my application in a test environment. However, when I want to push my code to github, I get the error:

GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.

So, I tried using Git LFS, but without any success. I tried to track my files but that does not seem to work. I followed the ‘Getting started’ guide on https://git-lfs.com/.

Since I use a Macbook, I develop via gitpod.io, as recommended in VIKTOR’s documentation. When I use: git lfs migrate import, (I’m unsure of what this does to be honest, but it was recommended as a fix), I get an permission denied error:

Unable to move /workspace/openSTEF/.git/lfs/tmp/1504205484 to /workspace/openSTEF/.git/lfs/objects/9c/4f/9c4f5fd95882379fe918eb9583d55a309f7c4a20c902170ef987bd6e584e9c2e

rename /workspace/openSTEF/.git/lfs/tmp/1504205484 /workspace/openSTEF/.git/lfs/objects/9c/4f/9c4f5fd95882379fe918eb9583d55a309f7c4a20c902170ef987bd6e584e9c2e: permission denied

Has anyone else any experience with this problem, and did someone find a solution for this problem?

Thanks in advance,

Ruben

Hi Ruben,

In this case I don’t think you want to version the files in your virtual environment folder. You can do this by adding a file named .gitignore to your repository.

You can find documentation regarding gitignore in the git documentation.

Github has an example gitignore template for Python here.

Hope this helps!

Hi,

Thanks for the quick response. I tried using .gitignore, with the Python template. However, when I use git add ., it still adds all virtual environment files and folders. My take was that it was maybe necessary for Viktor, but it sounds like that is not the case.

I will try and troubleshoot the problem a bit further, and post my findings. Thanks.

Ruben