Base solution for your next web application
Open Closed

Nightmare upgrading from 14.1 to 14.2 - git lfs issues #12479


User avatar
0
philipcj created

I have two repos on 2 different ASP.NET Zero projects, using ASP.NET Core / JQuery 14.1 I managed to upgrade the first one ok following the instructions in https://docs.aspnetzero.com/aspnet-core-mvc/latest/Version-Updating

This involves creating a aspnetzero branch and commiting and pushing it.

I copy in 14.2 into the aspnetzero branch I then run npm run create-bundles git add . git push

I get 100 missing files from git lfs what am i doing wrong?

I have spent hours on this, but for some reason, I managed to do it ok on my first repo by just trying again...

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

6 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @philipcj

    It sounds like the issue is that Git LFS is not properly set up on your local machine for the second repository, even though the .gitattributes file is already present.

    Ensure Git LFS is installed and initialized

    git lfs install
    

    Fetch the LFS-tracked files

    git lfs pull
    

    This will download the actual content of the large files that are referenced in the repository. Without this, you might have placeholder pointers instead of the real files, which results in the "missing files" error during push.

    Verify that LFS files are tracked

    git lfs ls-files
    

    This should list all the LFS managed files in your repo.

    Retry your commit and push

    git add .
    git commit -m "Fix missing LFS files"
    git push
    

    You need to do this while pulling the latest version of the aspnetzero project from the repository.

    If the issue persists after trying these steps, please feel free to contact us. Thank you.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    philipcj created

    This wasn't the answer. To problem was that the existing files in 14.1, were not in LFS.

    So this command was needed to put these into LFS:-

    git lfs migrate import --include="*.woff,*.woff2,*.ttf,*.eot"```
    
    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    philipcj created

    This wasn't the answer. To problem was that the existing files in 14.1, were not in LFS.

    So this command was needed to put these into LFS:-

    git lfs migrate import --include="*.woff,*.woff2,*.ttf,*.eot"```
    
    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    philipcj created

    I have managed to get lfs working on the two repos I have started from scratch, but the 13.2-> 14.1 -> 14.2 upgrade is a nightmare, I'm disabling lfs not only that my repo is totally broken. I've created a new repo and started from scratch copying in my changes from the old repo. Still with LFS turned off.

    When I come to upgrade next time I'm going to check if there are instructions for LFS, if not, it might get disabled on my two other repos. (Please provide instructions on how to upgrade if LFS is turned on) , e.g. do I have to import then lfs pull?????? I'm at 14.2 so I am not going to need this for quite a while hopefully.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @philipcj

    LFS track will be completely removed in the new 14.2 intermediate version to be released. You can review the changes made here, manually download the specified font files from the aspnet-zero-core project, add them to your project and access the real files.

    Thank you

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    philipcj created

    Hi

    What you have just said is fine with me.

    I suspect what I did wrong when I messed up my repo was that I did the git lfs migrate import and because i was getting errors I gave up and did a git lfs migrate export. I forgot I needed to do a git lfs pull after doing the import.

    After doing the export it said my branch histories had diverged, so I created a new repo at that point without lfs because I have no hair left to pull out! :-)

    Would this have solved the problem? I am not willing to try, although 2 of my 3 aspnetzero projects are using git lfs. I am more than happy to drop it!!! I have applications to write!

    Thanks for all your help.

    Regards

    Phil

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)